~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_bzrdir/test_bzrdir.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-01-26 10:49:57 UTC
  • mfrom: (4987.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100126104957-dmtqnc0pckuruyla
(vila,
        jam) Implement TestCase.overrideAttr to simplify tests setUp/cleanup

Show diffs side-by-side

added added

removed removed

Lines of Context:
1797
1797
 
1798
1798
class TestBreakLock(TestCaseWithBzrDir):
1799
1799
 
1800
 
    def setUp(self):
1801
 
        super(TestBreakLock, self).setUp()
1802
 
        # we want a UI factory that accepts canned input for the tests:
1803
 
        # while SilentUIFactory still accepts stdin, we need to customise
1804
 
        # ours
1805
 
        self.old_factory = bzrlib.ui.ui_factory
1806
 
        self.addCleanup(self.restoreFactory)
1807
 
 
1808
 
    def restoreFactory(self):
1809
 
        bzrlib.ui.ui_factory = self.old_factory
1810
 
 
1811
1800
    def test_break_lock_empty(self):
1812
1801
        # break lock on an empty bzrdir should work silently.
1813
1802
        dir = self.make_bzrdir('.')