~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_subsume.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-18 04:55:00 UTC
  • mfrom: (5784.2.1 754188-apport-test)
  • Revision ID: pqm@pqm.ubuntu.com-20110418045500-ce6lkgyiq7f47q43
(mbp) Rewrite test_report_bug_legacy away from using doctest (see bug
 764188) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006-2009, 2011 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
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib import bzrdir, errors, repository, workingtree, tests
 
17
from bzrlib import errors, workingtree, tests
18
18
 
19
19
 
20
20
class TestWorkingTree(tests.TestCaseWithTransport):
64
64
        # this test checks the subdir is removed, so it needs to know the
65
65
        # control directory; that changes rarely so just hardcode (and check)
66
66
        # it is correct.
67
 
        self.failUnlessExists('tree/subtree/.bzr')
 
67
        self.assertPathExists('tree/subtree/.bzr')
68
68
        base_tree.subsume(sub_tree)
69
69
        self.assertEqual(['tree-1', 'subtree-1'], base_tree.get_parent_ids())
70
70
        self.assertEqual(sub_root_id, base_tree.path2id('subtree'))
71
71
        self.assertEqual('file2-id', base_tree.path2id('subtree/file2'))
72
72
        # subsuming the tree removes the control directory, so you can't open
73
73
        # it.
74
 
        self.failIfExists('tree/subtree/.bzr')
 
74
        self.assertPathDoesNotExist('tree/subtree/.bzr')
75
75
        file2 = open('tree/subtree/file2', 'rb')
76
76
        try:
77
77
            file2_contents = file2.read()