~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_checkout.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-05 13:02:31 UTC
  • mto: This revision was merged to the branch mainline in revision 6434.
  • Revision ID: v.ladeuil+lp@free.fr-20120105130231-grtl31ovy72doqp9
Cleanup old blackbox tests and then some. Remove os.chdir() calls, caught a few bugs, make sure we don't leave file handles opened.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006, 2007, 2009, 2010 Canonical Ltd
 
1
# Copyright (C) 2006, 2007, 2009-2012 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
133
133
    def test_checkout_in_branch_with_r(self):
134
134
        branch = _mod_branch.Branch.open('branch')
135
135
        branch.bzrdir.destroy_workingtree()
136
 
        os.chdir('branch')
137
 
        self.run_bzr('checkout -r 1')
138
 
        tree = workingtree.WorkingTree.open('.')
 
136
        self.run_bzr('checkout -r 1', working_dir='branch')
 
137
        tree = workingtree.WorkingTree.open('branch')
139
138
        self.assertEqual('1', tree.last_revision())
140
139
        branch.bzrdir.destroy_workingtree()
141
 
        self.run_bzr('checkout -r 0')
 
140
        self.run_bzr('checkout -r 0', working_dir='branch')
142
141
        self.assertEqual('null:', tree.last_revision())
143
142
 
144
143
    def test_checkout_files_from(self):