Rev 3692: Rename branch_implementantions => per_branch. in http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/per_tests_239343
John Arbash Meinel
john at arbash-meinel.com
Thu Sep 4 22:00:32 BST 2008
At http://bzr.arbash-meinel.com/branches/bzr/1.8-dev/per_tests_239343
------------------------------------------------------------
revno: 3692
revision-id: john at arbash-meinel.com-20080904210024-af9587okhxci1ozb
parent: john at arbash-meinel.com-20080904203334-7dazd6ac3r9ubu4k
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: per_tests_239343
timestamp: Thu 2008-09-04 16:00:24 -0500
message:
Rename branch_implementantions => per_branch.
Also found a number of files that weren't using TestCaseWithBranch,
so were all running against the default branch format.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS 2008-09-04 20:33:34 +0000
+++ b/NEWS 2008-09-04 21:00:24 +0000
@@ -124,7 +124,8 @@
* ``bzrlib.tests.repository_implementations`` has been renamed to
``bzrlib.tests.per_repository`` so that we have a common structure
- (and it is shorter). (John Arbash Meinel, #239343)
+ (and it is shorter). This has also been done for
+ ``branch_implementations``. (John Arbash Meinel, #239343)
* ``selftest``'s ``--starting-with`` option can now use predefined
prefixes so that one can say ``bzr selftest -s bp.loom`` instead of
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py 2008-09-04 20:32:04 +0000
+++ b/bzrlib/tests/__init__.py 2008-09-04 21:00:24 +0000
@@ -2743,14 +2743,15 @@
'bzrlib.doc',
'bzrlib.util.tests.test_bencode',
'bzrlib.tests.blackbox',
- 'bzrlib.tests.branch_implementations',
'bzrlib.tests.bzrdir_implementations',
'bzrlib.tests.commands',
'bzrlib.tests.inventory_implementations',
'bzrlib.tests.interrepository_implementations',
'bzrlib.tests.intertree_implementations',
+ 'bzrlib.tests.per_branch',
'bzrlib.tests.per_lock',
'bzrlib.tests.per_repository',
+ 'bzrlib.tests.per_repository_reference',
'bzrlib.tests.test__dirstate_helpers',
'bzrlib.tests.test_ancestry',
'bzrlib.tests.test_annotate',
@@ -2835,7 +2836,6 @@
'bzrlib.tests.test_registry',
'bzrlib.tests.test_remote',
'bzrlib.tests.test_repository',
- 'bzrlib.tests.per_repository_reference',
'bzrlib.tests.test_revert',
'bzrlib.tests.test_revision',
'bzrlib.tests.test_revisionspec',
=== renamed directory 'bzrlib/tests/branch_implementations' => 'bzrlib/tests/per_branch'
=== modified file 'bzrlib/tests/per_branch/__init__.py'
--- a/bzrlib/tests/branch_implementations/__init__.py 2008-07-07 10:31:06 +0000
+++ b/bzrlib/tests/per_branch/__init__.py 2008-09-04 21:00:24 +0000
@@ -20,8 +20,8 @@
"""Branch implementation tests for bzr.
These test the conformance of all the branch variations to the expected API.
-Specific tests for individual formats are in the tests/test_branch file
-rather than in tests/branch_implementations/*.py.
+Specific tests for individual formats are in the tests/test_branch file
+rather than in tests/per_branch/*.py.
"""
from bzrlib import (
@@ -144,31 +144,32 @@
# add the tests for this module
result.addTests(basic_tests)
- test_branch_implementations = [
- 'bzrlib.tests.branch_implementations.test_bound_sftp',
- 'bzrlib.tests.branch_implementations.test_branch',
- 'bzrlib.tests.branch_implementations.test_break_lock',
- 'bzrlib.tests.branch_implementations.test_check',
- 'bzrlib.tests.branch_implementations.test_create_checkout',
- 'bzrlib.tests.branch_implementations.test_commit',
- 'bzrlib.tests.branch_implementations.test_get_revision_id_to_revno_map',
- 'bzrlib.tests.branch_implementations.test_hooks',
- 'bzrlib.tests.branch_implementations.test_http',
- 'bzrlib.tests.branch_implementations.test_last_revision_info',
- 'bzrlib.tests.branch_implementations.test_locking',
- 'bzrlib.tests.branch_implementations.test_parent',
- 'bzrlib.tests.branch_implementations.test_permissions',
- 'bzrlib.tests.branch_implementations.test_pull',
- 'bzrlib.tests.branch_implementations.test_push',
- 'bzrlib.tests.branch_implementations.test_reconcile',
- 'bzrlib.tests.branch_implementations.test_revision_history',
- 'bzrlib.tests.branch_implementations.test_revision_id_to_revno',
- 'bzrlib.tests.branch_implementations.test_sprout',
- 'bzrlib.tests.branch_implementations.test_stacking',
- 'bzrlib.tests.branch_implementations.test_tags',
- 'bzrlib.tests.branch_implementations.test_uncommit',
- 'bzrlib.tests.branch_implementations.test_update',
- ]
+ prefix = 'bzrlib.tests.per_branch.'
+ test_branch_implementations = [prefix + x for x in [
+ 'test_bound_sftp',
+ 'test_branch',
+ 'test_break_lock',
+ 'test_check',
+ 'test_create_checkout',
+ 'test_commit',
+ 'test_get_revision_id_to_revno_map',
+ 'test_hooks',
+ 'test_http',
+ 'test_last_revision_info',
+ 'test_locking',
+ 'test_parent',
+ 'test_permissions',
+ 'test_pull',
+ 'test_push',
+ 'test_reconcile',
+ 'test_revision_history',
+ 'test_revision_id_to_revno',
+ 'test_sprout',
+ 'test_stacking',
+ 'test_tags',
+ 'test_uncommit',
+ 'test_update',
+ ]]
# Generate a list of branch formats and their associated bzrdir formats to
# use.
combinations = [(format, format._matchingbzrdir) for format in
=== modified file 'bzrlib/tests/per_branch/test_bound_sftp.py'
--- a/bzrlib/tests/branch_implementations/test_bound_sftp.py 2007-07-25 22:08:47 +0000
+++ b/bzrlib/tests/per_branch/test_bound_sftp.py 2008-09-04 21:00:24 +0000
@@ -31,15 +31,15 @@
)
import bzrlib.errors as errors
from bzrlib.tests import TestSkipped
-from bzrlib.tests import TestCaseWithTransport
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.transport.local import LocalURLServer
from bzrlib.transport.memory import MemoryServer
-class BoundSFTPBranch(TestCaseWithTransport):
+class BoundSFTPBranch(TestCaseWithBranch):
def setUp(self):
- TestCaseWithTransport.setUp(self)
+ TestCaseWithBranch.setUp(self)
self.vfs_transport_factory = MemoryServer
if self.transport_server is LocalURLServer:
self.transport_server = None
=== modified file 'bzrlib/tests/per_branch/test_branch.py'
--- a/bzrlib/tests/branch_implementations/test_branch.py 2008-06-25 10:06:48 +0000
+++ b/bzrlib/tests/per_branch/test_branch.py 2008-09-04 21:00:24 +0000
@@ -42,7 +42,7 @@
import bzrlib.revision
from bzrlib.symbol_versioning import deprecated_in
from bzrlib.tests import TestCase, TestCaseWithTransport, TestSkipped
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.tests.http_server import HttpServer
from bzrlib.trace import mutter
from bzrlib.transport import get_transport
=== modified file 'bzrlib/tests/per_branch/test_break_lock.py'
--- a/bzrlib/tests/branch_implementations/test_break_lock.py 2007-11-26 02:03:03 +0000
+++ b/bzrlib/tests/per_branch/test_break_lock.py 2008-09-04 21:00:24 +0000
@@ -19,9 +19,9 @@
from cStringIO import StringIO
import bzrlib
-import bzrlib.errors as errors
+from bzrlib import errors
from bzrlib.tests import TestCase, TestCaseWithTransport, TestNotApplicable
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestBreakLock(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_check.py'
--- a/bzrlib/tests/branch_implementations/test_check.py 2008-06-11 07:52:25 +0000
+++ b/bzrlib/tests/per_branch/test_check.py 2008-09-04 21:00:24 +0000
@@ -17,7 +17,7 @@
"""Tests for branch implementations - test check() functionality"""
from bzrlib import errors
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestBranchCheck(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_commit.py'
--- a/bzrlib/tests/branch_implementations/test_commit.py 2008-06-03 04:33:18 +0000
+++ b/bzrlib/tests/per_branch/test_commit.py 2008-09-04 21:00:24 +0000
@@ -16,12 +16,12 @@
"""Tests for the contract of commit on branches."""
+from bzrlib import errors
from bzrlib.branch import Branch
-from bzrlib import errors
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.delta import TreeDelta
from bzrlib.revision import NULL_REVISION
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.transport import get_transport
-from bzrlib.delta import TreeDelta
class TestCommit(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_create_checkout.py'
--- a/bzrlib/tests/branch_implementations/test_create_checkout.py 2007-11-29 07:12:42 +0000
+++ b/bzrlib/tests/per_branch/test_create_checkout.py 2008-09-04 21:00:24 +0000
@@ -20,7 +20,7 @@
branch,
)
from bzrlib.remote import RemoteBranch
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestCreateCheckout(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_get_revision_id_to_revno_map.py'
--- a/bzrlib/tests/branch_implementations/test_get_revision_id_to_revno_map.py 2007-11-13 20:37:09 +0000
+++ b/bzrlib/tests/per_branch/test_get_revision_id_to_revno_map.py 2008-09-04 21:00:24 +0000
@@ -20,8 +20,7 @@
errors,
revision,
)
-
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestRevisionIdToDottedRevno(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_hooks.py'
--- a/bzrlib/tests/branch_implementations/test_hooks.py 2008-07-25 06:42:08 +0000
+++ b/bzrlib/tests/per_branch/test_hooks.py 2008-09-04 21:00:24 +0000
@@ -19,14 +19,14 @@
from bzrlib.errors import HookFailed, TipChangeRejected
from bzrlib.branch import Branch, ChangeBranchTipParams
from bzrlib.revision import NULL_REVISION
-from bzrlib.tests import TestCaseWithMemoryTransport
-
-
-class TestSetRevisionHistoryHook(TestCaseWithMemoryTransport):
+from bzrlib.tests.per_branch import TestCaseWithBranch
+
+
+class TestSetRevisionHistoryHook(TestCaseWithBranch):
def setUp(self):
self.hook_calls = []
- TestCaseWithMemoryTransport.setUp(self)
+ TestCaseWithBranch.setUp(self)
def capture_set_rh_hook(self, branch, rev_history):
"""Capture post set-rh hook calls to self.hook_calls.
@@ -81,7 +81,7 @@
])
-class ChangeBranchTipTestCase(TestCaseWithMemoryTransport):
+class ChangeBranchTipTestCase(TestCaseWithBranch):
"""Base TestCase for testing pre/post_change_branch_tip hooks."""
def install_logging_hook(self, prefix):
=== modified file 'bzrlib/tests/per_branch/test_http.py'
--- a/bzrlib/tests/branch_implementations/test_http.py 2007-12-11 14:26:18 +0000
+++ b/bzrlib/tests/per_branch/test_http.py 2008-09-04 21:00:24 +0000
@@ -19,8 +19,8 @@
import os
from bzrlib import branch, errors
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
from bzrlib.tests.http_server import HttpServer
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.transport.local import LocalURLServer
from bzrlib.transport.chroot import TestingChrootServer
=== modified file 'bzrlib/tests/per_branch/test_last_revision_info.py'
--- a/bzrlib/tests/branch_implementations/test_last_revision_info.py 2007-02-01 13:33:45 +0000
+++ b/bzrlib/tests/per_branch/test_last_revision_info.py 2008-09-04 21:00:24 +0000
@@ -17,16 +17,16 @@
"""Tests for branch.last_revision_info."""
from bzrlib.revision import NULL_REVISION
-from bzrlib.tests import TestCaseWithTransport
-
-
-class TestLastRevisionInfo(TestCaseWithTransport):
+from bzrlib.tests.per_branch import TestCaseWithBranch
+
+
+class TestLastRevisionInfo(TestCaseWithBranch):
def test_empty_branch(self):
# on an empty branch we want (0, NULL_REVISION)
branch = self.make_branch('branch')
self.assertEqual((0, NULL_REVISION), branch.last_revision_info())
-
+
def test_non_empty_branch(self):
# after the second commit we want (2, 'second-revid')
tree = self.make_branch_and_tree('branch')
=== modified file 'bzrlib/tests/per_branch/test_locking.py'
--- a/bzrlib/tests/branch_implementations/test_locking.py 2007-11-26 20:30:08 +0000
+++ b/bzrlib/tests/per_branch/test_locking.py 2008-09-04 21:00:24 +0000
@@ -20,8 +20,8 @@
from bzrlib.branch import BzrBranchFormat4
from bzrlib.bzrdir import RemoteBzrDirFormat
from bzrlib.tests import TestSkipped
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
from bzrlib.tests.lock_helpers import TestPreventLocking, LockWrapper
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestBranchLocking(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_parent.py'
--- a/bzrlib/tests/branch_implementations/test_parent.py 2007-12-21 17:26:37 +0000
+++ b/bzrlib/tests/per_branch/test_parent.py 2008-09-04 21:00:24 +0000
@@ -20,23 +20,23 @@
import bzrlib.errors
from bzrlib.osutils import getcwd
from bzrlib.tests import (
- TestCaseWithTransport,
TestNotApplicable,
TestSkipped,
)
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib import urlutils
"""Tests for Branch parent URL"""
-class TestParent(TestCaseWithTransport):
+class TestParent(TestCaseWithBranch):
def test_no_default_parent(self):
"""Branches should have no parent by default"""
b = self.make_branch('.')
self.assertEqual(None, b.get_parent())
-
+
def test_set_get_parent(self):
"""Set, re-get and reset the parent"""
b = self.make_branch('subdir')
=== modified file 'bzrlib/tests/per_branch/test_permissions.py'
--- a/bzrlib/tests/branch_implementations/test_permissions.py 2008-08-31 19:19:08 +0000
+++ b/bzrlib/tests/per_branch/test_permissions.py 2008-09-04 21:00:24 +0000
@@ -36,6 +36,7 @@
from bzrlib.bzrdir import BzrDir
from bzrlib.lockable_files import LockableFiles
from bzrlib.remote import RemoteBranchFormat
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.tests.test_permissions import chmod_r, check_mode_r
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
from bzrlib.transport import get_transport
@@ -54,7 +55,7 @@
return getattr(self._orig_stat, name)
-class TestPermissions(tests.TestCaseWithTransport):
+class TestPermissions(TestCaseWithBranch):
def test_new_branch(self):
if isinstance(self.branch_format, RemoteBranchFormat):
=== modified file 'bzrlib/tests/per_branch/test_pull.py'
--- a/bzrlib/tests/branch_implementations/test_pull.py 2008-06-09 15:37:14 +0000
+++ b/bzrlib/tests/per_branch/test_pull.py 2008-09-04 21:00:24 +0000
@@ -23,7 +23,7 @@
from bzrlib import errors
from bzrlib.memorytree import MemoryTree
from bzrlib.revision import NULL_REVISION
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestPull(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_push.py'
--- a/bzrlib/tests/branch_implementations/test_push.py 2008-05-23 07:33:05 +0000
+++ b/bzrlib/tests/per_branch/test_push.py 2008-09-04 21:00:24 +0000
@@ -24,7 +24,7 @@
from bzrlib.memorytree import MemoryTree
from bzrlib.remote import RemoteBranch
from bzrlib.revision import NULL_REVISION
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.transport.local import LocalURLServer
=== modified file 'bzrlib/tests/per_branch/test_reconcile.py'
--- a/bzrlib/tests/branch_implementations/test_reconcile.py 2008-06-11 07:52:25 +0000
+++ b/bzrlib/tests/per_branch/test_reconcile.py 2008-09-04 21:00:24 +0000
@@ -17,7 +17,7 @@
"""Tests for branch implementations - test reconcile() functionality"""
from bzrlib import errors, reconcile
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestBranchReconcile(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_revision_history.py'
--- a/bzrlib/tests/branch_implementations/test_revision_history.py 2008-06-16 16:55:05 +0000
+++ b/bzrlib/tests/per_branch/test_revision_history.py 2008-09-04 21:00:24 +0000
@@ -21,7 +21,7 @@
errors,
revision as _mod_revision,
)
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestLastRevision(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_revision_id_to_revno.py'
--- a/bzrlib/tests/branch_implementations/test_revision_id_to_revno.py 2007-07-11 16:42:37 +0000
+++ b/bzrlib/tests/per_branch/test_revision_id_to_revno.py 2008-09-04 21:00:24 +0000
@@ -18,7 +18,7 @@
from bzrlib import errors
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestRevisionIdToRevno(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_sprout.py'
--- a/bzrlib/tests/branch_implementations/test_sprout.py 2007-11-01 09:52:45 +0000
+++ b/bzrlib/tests/per_branch/test_sprout.py 2008-09-04 21:00:24 +0000
@@ -21,7 +21,7 @@
revision as _mod_revision,
tests,
)
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestSprout(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_stacking.py'
--- a/bzrlib/tests/branch_implementations/test_stacking.py 2008-08-20 16:14:09 +0000
+++ b/bzrlib/tests/per_branch/test_stacking.py 2008-09-04 21:00:24 +0000
@@ -22,7 +22,7 @@
)
from bzrlib.revision import NULL_REVISION
from bzrlib.tests import TestNotApplicable, KnownFailure
-from bzrlib.tests.branch_implementations import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestStacking(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_tags.py'
--- a/bzrlib/tests/branch_implementations/test_tags.py 2007-04-19 20:01:50 +0000
+++ b/bzrlib/tests/per_branch/test_tags.py 2008-09-04 21:00:24 +0000
@@ -31,8 +31,7 @@
from bzrlib.trace import mutter
from bzrlib.workingtree import WorkingTree
-from bzrlib.tests.branch_implementations.test_branch \
- import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
class TestBranchTags(TestCaseWithBranch):
=== modified file 'bzrlib/tests/per_branch/test_uncommit.py'
--- a/bzrlib/tests/branch_implementations/test_uncommit.py 2008-03-10 13:35:40 +0000
+++ b/bzrlib/tests/per_branch/test_uncommit.py 2008-09-04 21:00:24 +0000
@@ -21,7 +21,7 @@
from bzrlib.branch import Branch
from bzrlib import errors
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
from bzrlib.uncommit import uncommit
=== modified file 'bzrlib/tests/per_branch/test_update.py'
--- a/bzrlib/tests/branch_implementations/test_update.py 2008-05-29 20:17:37 +0000
+++ b/bzrlib/tests/per_branch/test_update.py 2008-09-04 21:00:24 +0000
@@ -19,7 +19,7 @@
errors,
revision as _mod_revision,
)
-from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
+from bzrlib.tests.per_branch import TestCaseWithBranch
"""Tests for branch.update()"""
More information about the bazaar-commits
mailing list