/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

(vila) Release 2.3.3 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
160
160
            dir.create_repository()
161
161
            format.initialize(dir)
162
162
            found_format = _mod_branch.BranchFormat.find_format(dir)
163
 
            self.failUnless(isinstance(found_format, format.__class__))
 
163
            self.assertIsInstance(found_format, format.__class__)
164
164
        check_format(_mod_branch.BzrBranchFormat5(), "bar")
165
165
 
166
166
    def test_find_format_factory(self):
260
260
 
261
261
    def test_layout(self):
262
262
        branch = self.make_branch('a', format=self.get_format_name())
263
 
        self.failUnlessExists('a/.bzr/branch/last-revision')
264
 
        self.failIfExists('a/.bzr/branch/revision-history')
265
 
        self.failIfExists('a/.bzr/branch/references')
 
263
        self.assertPathExists('a/.bzr/branch/last-revision')
 
264
        self.assertPathDoesNotExist('a/.bzr/branch/revision-history')
 
265
        self.assertPathDoesNotExist('a/.bzr/branch/references')
266
266
 
267
267
    def test_config(self):
268
268
        """Ensure that all configuration data is stored in the branch"""
269
269
        branch = self.make_branch('a', format=self.get_format_name())
270
270
        branch.set_parent('http://example.com')
271
 
        self.failIfExists('a/.bzr/branch/parent')
 
271
        self.assertPathDoesNotExist('a/.bzr/branch/parent')
272
272
        self.assertEqual('http://example.com', branch.get_parent())
273
273
        branch.set_push_location('sftp://example.com')
274
274
        config = branch.get_config()._get_branch_data_config()
275
275
        self.assertEqual('sftp://example.com',
276
276
                         config.get_user_option('push_location'))
277
277
        branch.set_bound_location('ftp://example.com')
278
 
        self.failIfExists('a/.bzr/branch/bound')
 
278
        self.assertPathDoesNotExist('a/.bzr/branch/bound')
279
279
        self.assertEqual('ftp://example.com', branch.get_bound_location())
280
280
 
281
281
    def test_set_revision_history(self):
309
309
        subtree.commit('a subtree file')
310
310
        subsubtree.commit('a subsubtree file')
311
311
        tree.branch.create_checkout('target', lightweight=lightweight)
312
 
        self.failUnlessExists('target')
313
 
        self.failUnlessExists('target/subtree')
314
 
        self.failUnlessExists('target/subtree/file')
315
 
        self.failUnlessExists('target/subtree/subsubtree/file')
 
312
        self.assertPathExists('target')
 
313
        self.assertPathExists('target/subtree')
 
314
        self.assertPathExists('target/subtree/file')
 
315
        self.assertPathExists('target/subtree/subsubtree/file')
316
316
        subbranch = _mod_branch.Branch.open('target/subtree/subsubtree')
317
317
        if lightweight:
318
318
            self.assertEndsWith(subbranch.base, 'source/subtree/subsubtree/')