/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/per_branch/test_branch.py

(mbp) stop using failIf, failUnless, etc (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
327
327
        # config file in the branch.
328
328
        branch.nick = "Aaron's branch"
329
329
        if not isinstance(branch, remote.RemoteBranch):
330
 
            self.failUnless(branch._transport.has("branch.conf"))
 
330
            self.assertTrue(branch._transport.has("branch.conf"))
331
331
        # Because the nick has been set explicitly, the nick is now always
332
332
        # "Aaron's branch", regardless of directory name.
333
333
        self.assertEqual(branch.nick, "Aaron's branch")
386
386
    def test_format_description(self):
387
387
        tree = self.make_branch_and_tree('tree')
388
388
        text = tree.branch._format.get_format_description()
389
 
        self.failUnless(len(text))
 
389
        self.assertTrue(len(text))
390
390
 
391
391
    def test_get_commit_builder(self):
392
392
        branch = self.make_branch(".")
672
672
        t = self.get_transport()
673
673
        readonly_t = transport.get_transport(self.get_readonly_url())
674
674
        made_branch = self.make_branch('.')
675
 
        self.failUnless(isinstance(made_branch, _mod_branch.Branch))
 
675
        self.assertIsInstance(made_branch, _mod_branch.Branch)
676
676
 
677
677
        # find it via bzrdir opening:
678
678
        opened_control = bzrdir.BzrDir.open(readonly_t.base)
679
679
        direct_opened_branch = opened_control.open_branch()
680
680
        self.assertEqual(direct_opened_branch.__class__, made_branch.__class__)
681
681
        self.assertEqual(opened_control, direct_opened_branch.bzrdir)
682
 
        self.failUnless(isinstance(direct_opened_branch._format,
683
 
                        self.branch_format.__class__))
 
682
        self.assertIsInstance(direct_opened_branch._format,
 
683
            self.branch_format.__class__)
684
684
 
685
685
        # find it via Branch.open
686
686
        opened_branch = _mod_branch.Branch.open(readonly_t.base)
687
 
        self.failUnless(isinstance(opened_branch, made_branch.__class__))
 
687
        self.assertIsInstance(opened_branch, made_branch.__class__)
688
688
        self.assertEqual(made_branch._format.__class__,
689
689
                         opened_branch._format.__class__)
690
690
        # if it has a unique id string, can we probe for it ?