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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 18:10:28 UTC
  • mto: This revision was merged to the branch mainline in revision 6623.
  • Revision ID: jelmer@jelmer.uk-20170521181028-zn04pdfw0od9hfj3
Rename brzlib => breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
 
25
25
from cStringIO import StringIO
26
26
 
27
 
from brzlib import (
 
27
from breezy import (
28
28
    branch as _mod_branch,
29
29
    bzrdir,
30
30
    config,
34
34
    trace,
35
35
    urlutils,
36
36
    )
37
 
from brzlib.branchfmt.fullhistory import (
 
37
from breezy.branchfmt.fullhistory import (
38
38
    BzrBranch5,
39
39
    BzrBranchFormat5,
40
40
    )
195
195
        SampleSupportedBranchFormat().initialize(dir)
196
196
        factory = _mod_branch.MetaDirBranchFormatFactory(
197
197
            SampleSupportedBranchFormatString,
198
 
            "brzlib.tests.test_branch", "SampleSupportedBranchFormat")
 
198
            "breezy.tests.test_branch", "SampleSupportedBranchFormat")
199
199
        _mod_branch.format_registry.register(factory)
200
200
        self.addCleanup(_mod_branch.format_registry.remove, factory)
201
201
        b = _mod_branch.Branch.open(self.get_url())
267
267
 
268
268
    def test_register_extra_lazy(self):
269
269
        self.assertEqual([], self.registry._get_all())
270
 
        self.registry.register_extra_lazy("brzlib.tests.test_branch",
 
270
        self.registry.register_extra_lazy("breezy.tests.test_branch",
271
271
            "SampleExtraBranchFormat")
272
272
        formats = self.registry._get_all()
273
273
        self.assertEqual(1, len(formats))
291
291
        global FakeLazyFormat
292
292
        del FakeLazyFormat
293
293
        factory = _mod_branch.MetaDirBranchFormatFactory(None,
294
 
            "brzlib.tests.test_branch", "FakeLazyFormat")
 
294
            "breezy.tests.test_branch", "FakeLazyFormat")
295
295
        self.assertRaises(AttributeError, factory)
296
296
 
297
297
    def test_call_returns_call_of_referenced_object(self):
298
298
        global FakeLazyFormat
299
299
        FakeLazyFormat = lambda:'called'
300
300
        factory = _mod_branch.MetaDirBranchFormatFactory(None,
301
 
            "brzlib.tests.test_branch", "FakeLazyFormat")
 
301
            "breezy.tests.test_branch", "FakeLazyFormat")
302
302
        self.assertEqual('called', factory())
303
303
 
304
304
 
596
596
        self.assertStartsWith(param_repr, '<BranchInitHookParams of ')
597
597
 
598
598
    def test_post_switch_hook(self):
599
 
        from brzlib import switch
 
599
        from breezy import switch
600
600
        calls = []
601
601
        _mod_branch.Branch.hooks.install_named_hook('post_switch',
602
602
            calls.append, None)