Rev 5017: Fix per_repository/test_write_group.py imports. in file:///home/vila/src/bzr/cleanup/test-imports/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Fri Feb 5 14:40:22 GMT 2010
At file:///home/vila/src/bzr/cleanup/test-imports/
------------------------------------------------------------
revno: 5017
revision-id: v.ladeuil+lp at free.fr-20100205144022-g28bjyllj1frk3o6
parent: v.ladeuil+lp at free.fr-20100205143654-m8p3o425n63wf8v8
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: test-imports
timestamp: Fri 2010-02-05 15:40:22 +0100
message:
Fix per_repository/test_write_group.py imports.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository/test_write_group.py'
--- a/bzrlib/tests/per_repository/test_write_group.py 2009-10-15 02:11:18 +0000
+++ b/bzrlib/tests/per_repository/test_write_group.py 2010-02-05 14:40:22 +0000
@@ -19,21 +19,21 @@
import sys
from bzrlib import (
+ branch,
bzrdir,
errors,
graph,
memorytree,
osutils,
remote,
+ tests,
versionedfile,
)
-from bzrlib.branch import BzrBranchFormat7
from bzrlib.transport import local, memory
-from bzrlib.tests import TestNotApplicable
-from bzrlib.tests.per_repository import TestCaseWithRepository
-
-
-class TestWriteGroup(TestCaseWithRepository):
+from bzrlib.tests import per_repository
+
+
+class TestWriteGroup(per_repository.TestCaseWithRepository):
def test_start_write_group_unlocked_needs_write_lock(self):
repo = self.make_repository('.')
@@ -131,7 +131,7 @@
self.assertEqual(None, repo.abort_write_group(suppress_errors=True))
-class TestGetMissingParentInventories(TestCaseWithRepository):
+class TestGetMissingParentInventories(per_repository.TestCaseWithRepository):
def test_empty_get_missing_parent_inventories(self):
"""A new write group has no missing parent inventories."""
@@ -183,8 +183,8 @@
else:
repo = self.make_repository(relpath)
if not repo._format.supports_external_lookups:
- raise TestNotApplicable('format not stackable')
- repo.bzrdir._format.set_branch_format(BzrBranchFormat7())
+ raise tests.TestNotApplicable('format not stackable')
+ repo.bzrdir._format.set_branch_format(branch.BzrBranchFormat7())
return repo
def reopen_repo_and_resume_write_group(self, repo):
@@ -334,7 +334,7 @@
repo = self.make_repository('test-repo')
if (not repo._format.supports_external_lookups or
isinstance(repo, remote.RemoteRepository)):
- raise TestNotApplicable(
+ raise tests.TestNotApplicable(
'only valid for direct connections to resumable repos')
# log calls to get_missing_parent_inventories, so that we can assert it
# is called with the correct parameters
@@ -361,7 +361,7 @@
self.assertEqual([True], call_log)
-class TestResumeableWriteGroup(TestCaseWithRepository):
+class TestResumeableWriteGroup(per_repository.TestCaseWithRepository):
def make_write_locked_repo(self, relpath='repo'):
repo = self.make_repository(relpath)
@@ -384,7 +384,7 @@
wg_tokens = repo.suspend_write_group()
except errors.UnsuspendableWriteGroup:
repo.abort_write_group()
- raise TestNotApplicable(reason)
+ raise tests.TestNotApplicable(reason)
def test_suspend_write_group(self):
repo = self.make_write_locked_repo()
More information about the bazaar-commits
mailing list