~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository_reference/test_break_lock.py

  • Committer: Robert Collins
  • Date: 2010-04-08 04:34:03 UTC
  • mfrom: (5138 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5139.
  • Revision ID: robertc@robertcollins.net-20100408043403-56z0d07vdqrx7f3t
Update bugfix for 528114 to trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
 
17
17
"""Tests for break_lock on a repository with external references."""
18
18
 
19
 
import bzrlib.ui
20
 
from bzrlib import errors
 
19
from bzrlib import (
 
20
    errors,
 
21
    ui,
 
22
    )
21
23
from bzrlib.tests.per_repository_reference import (
22
24
    TestCaseWithExternalReferenceRepository,
23
25
    )
24
 
from bzrlib.ui import (
25
 
    CannedInputUIFactory,
26
 
    )
27
26
 
28
27
 
29
28
class TestBreakLock(TestCaseWithExternalReferenceRepository):
42
41
            # 'lock_write' has not taken a physical mutex out.
43
42
            repo.unlock()
44
43
            return
45
 
        self.old_factory = bzrlib.ui.ui_factory
46
 
        self.addCleanup(self.restoreFactory)
47
 
        bzrlib.ui.ui_factory = CannedInputUIFactory([True])
 
44
        ui.ui_factory = ui.CannedInputUIFactory([True])
48
45
        unused_repo.break_lock()
49
46
        self.assertRaises(errors.LockBroken, repo.unlock)