/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_library_state.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 01:35:14 UTC
  • mfrom: (7490.7.6 work)
  • mto: This revision was merged to the branch mainline in revision 7499.
  • Revision ID: jelmer@jelmer.uk-20200322013514-7vw1ntwho04rcuj3
merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
52
52
        finally:
53
53
            state.__exit__(None, None, None)
54
54
            self.assertEqual(['__enter__', '__exit__'], tracer._calls)
 
55
 
 
56
    def test_ui_not_specified(self):
 
57
        self.overrideAttr(breezy, '_global_state', None)
 
58
        state = library_state.BzrLibraryState(
 
59
            ui=None, trace=fixtures.RecordingContextManager())
 
60
        orig_ui = _mod_ui.ui_factory
 
61
        state.__enter__()
 
62
        try:
 
63
            self.assertEqual(orig_ui, _mod_ui.ui_factory)
 
64
        finally:
 
65
            state.__exit__(None, None, None)
 
66
            self.assertEqual(orig_ui, _mod_ui.ui_factory)