20
20
from bzrlib import (
26
class TestLibraryState(tests.TestCase):
27
# TODO: once sufficiently cleaned up this should be able to be TestCase.
28
class TestLibraryState(tests.TestCaseWithTransport):
30
def test_ui_is_used(self):
31
ui = _mod_ui.SilentUIFactory()
32
state = library_state.BzrLibraryState(ui=ui)
33
orig_ui = _mod_ui.ui_factory
36
self.assertEqual(ui, _mod_ui.ui_factory)
38
state.__exit__(None, None, None)
39
self.assertEqual(orig_ui, _mod_ui.ui_factory)