Rev 5021: Fix imports in per_branch/test_break_lock.py. in file:///home/vila/src/bzr/cleanup/test-imports/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Feb 8 08:41:38 GMT 2010


At file:///home/vila/src/bzr/cleanup/test-imports/

------------------------------------------------------------
revno: 5021
revision-id: v.ladeuil+lp at free.fr-20100208084138-yq4z51j5er9ebbpq
parent: v.ladeuil+lp at free.fr-20100205162549-avumrr0whgdf3ite
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-imports
timestamp: Mon 2010-02-08 09:41:38 +0100
message:
  Fix imports in per_branch/test_break_lock.py.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_branch/test_break_lock.py'
--- a/bzrlib/tests/per_branch/test_break_lock.py	2010-01-25 17:48:22 +0000
+++ b/bzrlib/tests/per_branch/test_break_lock.py	2010-02-08 08:41:38 +0000
@@ -16,17 +16,15 @@
 
 """Tests for branch break-lock behaviour."""
 
-from cStringIO import StringIO
-
 from  bzrlib import (
     errors,
     ui,
+    tests,
     )
-from bzrlib.tests import TestCase, TestCaseWithTransport, TestNotApplicable
-from bzrlib.tests.per_branch.test_branch import TestCaseWithBranch
-
-
-class TestBreakLock(TestCaseWithBranch):
+from bzrlib.tests import per_branch
+
+
+class TestBreakLock(per_branch.TestCaseWithBranch):
 
     def setUp(self):
         super(TestBreakLock, self).setUp()
@@ -46,12 +44,14 @@
         token = self.branch.repository.lock_write()
         if token is None:
             self.branch.repository.unlock()
-            raise TestNotApplicable('Repository does not use physical locks.')
+            raise tests.TestNotApplicable(
+                'Repository does not use physical locks.')
         self.branch.repository.leave_lock_in_place()
         self.branch.repository.unlock()
         other_instance = self.branch.repository.bzrdir.open_repository()
         if not other_instance.get_physical_lock_status():
-            raise TestNotApplicable("Repository does not lock persistently.")
+            raise tests.TestNotApplicable(
+                'Repository does not lock persistently.')
         ui.ui_factory = ui.CannedInputUIFactory([True])
         try:
             self.unused_branch.break_lock()



More information about the bazaar-commits mailing list