~bzr/ubuntu/hardy/bzr/bzr-ppa

« back to all changes in this revision

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

  • Committer: Max Bowsher
  • Date: 2011-05-15 10:59:12 UTC
  • mfrom: (76.1.75 jaunty)
  • Revision ID: _@maxb.eu-20110515105912-fm5vlpaef7r76yo2
Tags: 2.3.3-0~bazaar1~hardy1
* Merge from Debian 2.3 packaging branch:
  - New upstream release.
* Return to using external python-configobj package for natty.
* However for maverick and earlier, continue to drop the patching and stay
  with bzr's internal copy of configobj.
* Add an empty python-bzrlib.tests transitional package for PPA builds.
* Apply the patch 07_lazy_import_scope - ScopeReplacer exceptions are
  causing failure of some tests.
* For lucid and earlier, loosen debhelper builddep version and remove
  --list-missing --fail-missing from dh_install.
* For karmic and earlier, there is no python-meliae or python-lzma.
* For jaunty and earlier, build-depend on quilt and use dh --with quilt.
* For hardy, add preinst script to work around hardy's python-central
  failing to clean up after packages migrating away from python-central.
* Add python-medusa, python-lzma and python-meliae as build
  dependencies (used by the test suite).
* Remove John Ferlito from Uploaders.
* Prefer cython as build dependency.
* Remove generated C files during clean.
* New upstream release.
 + Build depend on python-configobj >= 4.7.2+ds-2 which has a fix for bug
   #618349 which breaks the Bazaar testsuite.
* Switch to dh_python2.
* Switch to debhelper 7, drop cdbs.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        # here locally.
40
40
        shared_repo = self.make_repository('.')
41
41
        self.run_bzr(['mkdir', 'abc'], retcode=3)
42
 
        self.failIfExists('abc')
 
42
        self.assertPathDoesNotExist('abc')
43
43
 
44
44
 
45
45
class TestVersioning(TestCaseInTempDir):
61
61
 
62
62
        self.assertEquals(len(delta.added), 1)
63
63
        self.assertEquals(delta.added[0][0], 'foo')
64
 
        self.failIf(delta.modified)
 
64
        self.assertFalse(delta.modified)
65
65
 
66
66
    def test_mkdir_in_subdir(self):
67
67
        """'bzr mkdir' operation in subdirectory"""
85
85
        self.assertEquals(len(delta.added), 2)
86
86
        self.assertEquals(delta.added[0][0], 'dir')
87
87
        self.assertEquals(delta.added[1][0], pathjoin('dir','subdir'))
88
 
        self.failIf(delta.modified)
 
88
        self.assertFalse(delta.modified)
89
89
 
90
90
    def test_mkdir_w_nested_trees(self):
91
91
        """'bzr mkdir' with nested trees"""
100
100
        os.chdir('../..')
101
101
 
102
102
        self.run_bzr(['mkdir', 'dir', 'a/dir', 'a/b/dir'])
103
 
        self.failUnless(os.path.isdir('dir'))
104
 
        self.failUnless(os.path.isdir('a/dir'))
105
 
        self.failUnless(os.path.isdir('a/b/dir'))
 
103
        self.assertTrue(os.path.isdir('dir'))
 
104
        self.assertTrue(os.path.isdir('a/dir'))
 
105
        self.assertTrue(os.path.isdir('a/b/dir'))
106
106
 
107
107
        wt = WorkingTree.open('.')
108
108
        wt_a = WorkingTree.open('a')
111
111
        delta = wt.changes_from(wt.basis_tree())
112
112
        self.assertEquals(len(delta.added), 1)
113
113
        self.assertEquals(delta.added[0][0], 'dir')
114
 
        self.failIf(delta.modified)
 
114
        self.assertFalse(delta.modified)
115
115
 
116
116
        delta = wt_a.changes_from(wt_a.basis_tree())
117
117
        self.assertEquals(len(delta.added), 1)
118
118
        self.assertEquals(delta.added[0][0], 'dir')
119
 
        self.failIf(delta.modified)
 
119
        self.assertFalse(delta.modified)
120
120
 
121
121
        delta = wt_b.changes_from(wt_b.basis_tree())
122
122
        self.assertEquals(len(delta.added), 1)
123
123
        self.assertEquals(delta.added[0][0], 'dir')
124
 
        self.failIf(delta.modified)
 
124
        self.assertFalse(delta.modified)
125
125
 
126
126
    def check_branch(self):
127
127
        """After all the above changes, run the check and upgrade commands.