Rev 4287: (trivial) Cleanup test imports and use features to better track skipped tests. in http://bazaar.launchpad.net/%7Evila/bzr/integration

Vincent Ladeuil v.ladeuil+lp at free.fr
Sat Apr 11 22:52:28 BST 2009


At http://bazaar.launchpad.net/%7Evila/bzr/integration

------------------------------------------------------------
revno: 4287 [merge]
revision-id: v.ladeuil+lp at free.fr-20090411215221-2ru3bevvgk0t7ybv
parent: pqm at pqm.ubuntu.com-20090411162933-dtrs0q12d9qvbgk6
parent: v.ladeuil+lp at free.fr-20090411160653-eq1gfn41q3lzhmss
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: integration
timestamp: Sat 2009-04-11 23:52:21 +0200
message:
  (trivial) Cleanup test imports and use features to better track skipped tests.
modified:
  bzrlib/tests/test_workingtree_4.py test_workingtree_4.p-20070223025758-531n3tznl3zacv2o-1
  bzrlib/tests/tree_implementations/__init__.py __init__.py-20060717075546-420s7b0bj9hzeowi-2
  bzrlib/tests/tree_implementations/test_get_symlink_target.py test_get_symlink_tar-20070225165554-ickod3w3t7u0zzqh-1
  bzrlib/tests/tree_implementations/test_inv.py test_inv.py-20070312023226-0cdvk5uwhutis9vg-1
  bzrlib/tests/tree_implementations/test_path_content_summary.py test_path_content_su-20070904100855-3vrwedz6akn34kl5-1
  bzrlib/tests/tree_implementations/test_test_trees.py test_tree_trees.py-20060720091921-3nwi5h21lf06vf5p-1
  bzrlib/tests/tree_implementations/test_walkdirs.py test_walkdirs.py-20060729160421-gmjnkotqgxdh98ce-1
  bzrlib/tests/workingtree_implementations/__init__.py __init__.py-20060203003124-b2aa5aca21a8bfad
------------------------------------------------------------
Use --levels 0 (or -n0) to see merged revisions.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_workingtree_4.py'
--- a/bzrlib/tests/test_workingtree_4.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/test_workingtree_4.py	2009-04-11 16:06:53 +0000
@@ -64,7 +64,8 @@
             - when the WorkingTree is locked, LockDir can see that
         """
         # this test could be factored into a subclass of tests common to both
-        # format 3 and 4, but for now its not much of an issue as there is only one in common.
+        # format 3 and 4, but for now its not much of an issue as there is only
+        # one in common.
         t = self.get_transport()
         tree = self.make_workingtree()
         self.assertIsDirectory('.bzr', t)
@@ -660,7 +661,8 @@
         # Create a corrupted dirstate
         tree.lock_write()
         try:
-            tree.commit('init') # We need a parent, or we always compare with NULL
+            # We need a parent, or we always compare with NULL
+            tree.commit('init')
             state = tree.current_dirstate()
             state._read_dirblocks_if_needed()
             # Now add in an invalid entry, a rename with a dangling pointer

=== modified file 'bzrlib/tests/tree_implementations/__init__.py'
--- a/bzrlib/tests/tree_implementations/__init__.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/__init__.py	2009-04-11 16:06:53 +0000
@@ -32,13 +32,6 @@
     tests,
     transform,
     )
-from bzrlib.transport import get_transport
-from bzrlib.tests import (
-                          multiply_tests,
-                          default_transport,
-                          TestCaseWithTransport,
-                          TestSkipped,
-                          )
 from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
 from bzrlib.tests.workingtree_implementations import (
     make_scenarios as wt_make_scenarios,
@@ -97,7 +90,7 @@
     return preview_tree
 
 
-class TestTreeImplementationSupport(TestCaseWithTransport):
+class TestTreeImplementationSupport(tests.TestCaseWithTransport):
 
     def test_revision_tree_from_workingtree(self):
         tree = self.make_branch_and_tree('.')
@@ -239,6 +232,7 @@
         note that the order of the paths and fileids is deliberately
         mismatched to ensure that the result order is path based.
         """
+        self.requireFeature(tests.UnicodeFilenameFeature)
         tree = self.make_branch_and_tree('.')
         paths = ['0file',
             '1top-dir/',
@@ -253,11 +247,7 @@
             '1file-in-1topdir',
             '0dir-in-1topdir'
             ]
-        try:
-            self.build_tree(paths)
-        except UnicodeError:
-            raise TestSkipped(
-                'This platform does not support unicode file paths.')
+        self.build_tree(paths)
         tree.add(paths, ids)
         tt = transform.TreeTransform(tree)
         if symlinks:
@@ -274,6 +264,7 @@
 
     def _create_tree_with_utf8(self, tree):
         """Generate a tree with a utf8 revision and unicode paths."""
+        self.requireFeature(tests.UnicodeFilenameFeature)
         # We avoid combining characters in file names here, normalization
         # checks (as performed by some file systems (OSX) are outside the scope
         # of these tests).  We use the euro sign \N{Euro Sign} or \u20ac in
@@ -290,10 +281,7 @@
                     'ba\xe2\x82\xacr-id',
                     'ba\xe2\x82\xacz-id',
                    ]
-        try:
-            self.build_tree(paths[1:])
-        except UnicodeError:
-            raise tests.TestSkipped('filesystem does not support unicode.')
+        self.build_tree(paths[1:])
         if tree.get_root_id() is None:
             # Some trees do not have a root yet.
             tree.add(paths, file_ids)
@@ -333,7 +321,7 @@
     for scenario in scenarios:
         # for working tree format tests, preserve the tree
         scenario[1]["_workingtree_to_test_tree"] = return_parameter
-        # add RevisionTree scenario
+    # add RevisionTree scenario
     workingtree_format = WorkingTreeFormat._default_format
     scenarios.append((RevisionTree.__name__,
         create_tree_scenario(transport_server, transport_readonly_server,
@@ -359,7 +347,6 @@
     workingtree_format, converter):
     """Create a scenario for the specified converter
 
-    :param name: The name to append to tests using this converter
     :param converter: A function that converts a workingtree into the
         desired format.
     :param workingtree_format: The particular workingtree format to
@@ -367,8 +354,9 @@
     :return: a (name, options) tuple, where options is a dict of values
         to be used as members of the TestCase.
     """
-    scenario_options = wt_make_scenario(transport_server, transport_readonly_server,
-        workingtree_format)
+    scenario_options = wt_make_scenario(transport_server,
+                                        transport_readonly_server,
+                                        workingtree_format)
     scenario_options["_workingtree_to_test_tree"] = converter
     return scenario_options
 
@@ -389,10 +377,10 @@
         'bzrlib.tests.tree_implementations.test_walkdirs',
         ])
     scenarios = make_scenarios(
-        default_transport,
+        tests.default_transport,
         # None here will cause a readonly decorator to be created
         # by the TestCaseWithTransport.get_readonly_transport method.
         None,
         WorkingTreeFormat._formats.values() + _legacy_formats)
     # add the tests for the sub modules
-    return multiply_tests(submod_tests, scenarios, standard_tests)
+    return tests.multiply_tests(submod_tests, scenarios, standard_tests)

=== modified file 'bzrlib/tests/tree_implementations/test_get_symlink_target.py'
--- a/bzrlib/tests/tree_implementations/test_get_symlink_target.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/test_get_symlink_target.py	2009-04-11 16:06:53 +0000
@@ -23,10 +23,10 @@
     osutils,
     tests,
     )
-from bzrlib.tests.tree_implementations import TestCaseWithTree
-
-
-class TestGetSymlinkTarget(TestCaseWithTree):
+from bzrlib.tests import tree_implementations
+
+
+class TestGetSymlinkTarget(tree_implementations.TestCaseWithTree):
 
     def get_tree_with_symlinks(self):
         self.requireFeature(tests.SymlinkFeature)
@@ -49,14 +49,13 @@
 
     def test_get_unicode_symlink_target(self):
         self.requireFeature(tests.SymlinkFeature)
+        self.requireFeature(tests.UnicodeFilenameFeature)
         tree = self.make_branch_and_tree('tree')
-        try:
-            os.symlink('target',  u'tree/\u03b2_link'.encode(osutils._fs_enc))
-        except UnicodeError:
-            raise tests.TestSkipped(
-                'This platform does not support unicode file paths.')
+        target = u'targ\N{Euro Sign}t'
+        os.symlink(target,  u'tree/\u03b2_link'.encode(osutils._fs_enc))
         tree.add([u'\u03b2_link'], ['unicode-link-id'])
         tree.lock_read()
         self.addCleanup(tree.unlock)
-        self.assertEqual('target', tree.get_symlink_target(u'unicode-link-id'))
+        actual = tree.get_symlink_target(u'unicode-link-id')
+        self.assertEqual(target, actual)
 

=== modified file 'bzrlib/tests/tree_implementations/test_inv.py'
--- a/bzrlib/tests/tree_implementations/test_inv.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/test_inv.py	2009-04-11 16:06:53 +0000
@@ -20,11 +20,12 @@
 from cStringIO import StringIO
 import os
 
-from bzrlib.diff import internal_diff
+from bzrlib import (
+    tests,
+    )
+from bzrlib.tests import tree_implementations
 from bzrlib.mutabletree import MutableTree
-from bzrlib.osutils import has_symlinks
 from bzrlib.tests import SymlinkFeature, TestSkipped
-from bzrlib.tests.tree_implementations import TestCaseWithTree
 from bzrlib.transform import _PreviewTree
 from bzrlib.uncommit import uncommit
 
@@ -33,7 +34,7 @@
     return tree.iter_entries_by_dir([file_id]).next()[1]
 
 
-class TestPreviousHeads(TestCaseWithTree):
+class TestPreviousHeads(tree_implementations.TestCaseWithTree):
 
     def setUp(self):
         # we want several inventories, that respectively
@@ -68,16 +69,17 @@
     # TODO: test two inventories with the same file revision
 
 
-class TestInventory(TestCaseWithTree):
-
-    def _set_up(self):
+class TestInventoryWithSymlinks(tree_implementations.TestCaseWithTree):
+
+    _test_needs_features = [tests.SymlinkFeature]
+
+    def setUp(self):
+        tree_implementations.TestCaseWithTree.setUp(self)
         self.tree = self.get_tree_with_subdirs_and_all_content_types()
         self.tree.lock_read()
         self.addCleanup(self.tree.unlock)
 
     def test_symlink_target(self):
-        self.requireFeature(SymlinkFeature)
-        self._set_up()
         if isinstance(self.tree, (MutableTree, _PreviewTree)):
             raise TestSkipped(
                 'symlinks not accurately represented in working trees and'
@@ -86,24 +88,21 @@
         self.assertEqual(entry.symlink_target, 'link-target')
 
     def test_symlink_target_tree(self):
-        self.requireFeature(SymlinkFeature)
-        self._set_up()
         self.assertEqual('link-target',
                          self.tree.get_symlink_target('symlink'))
 
     def test_kind_symlink(self):
-        self.requireFeature(SymlinkFeature)
-        self._set_up()
         self.assertEqual('symlink', self.tree.kind('symlink'))
         self.assertIs(None, self.tree.get_file_size('symlink'))
 
     def test_symlink(self):
-        self.requireFeature(SymlinkFeature)
-        self._set_up()
         entry = get_entry(self.tree, self.tree.path2id('symlink'))
         self.assertEqual(entry.kind, 'symlink')
         self.assertEqual(None, entry.text_size)
 
+
+class TestInventory(tree_implementations.TestCaseWithTree):
+
     def test_paths2ids_recursive(self):
         work_tree = self.make_branch_and_tree('tree')
         self.build_tree(['tree/dir/', 'tree/dir/file'])
@@ -136,27 +135,31 @@
 
     def test_canonical_path(self):
         work_tree = self._make_canonical_test_tree()
-        self.assertEqual(work_tree.get_canonical_inventory_path('Dir/File'), 'dir/file')
+        self.assertEqual('dir/file',
+                         work_tree.get_canonical_inventory_path('Dir/File'))
 
     def test_canonical_path_before_commit(self):
         work_tree = self._make_canonical_test_tree(False)
         # note: not committed.
-        self.assertEqual(work_tree.get_canonical_inventory_path('Dir/File'), 'dir/file')
+        self.assertEqual('dir/file',
+                         work_tree.get_canonical_inventory_path('Dir/File'))
 
     def test_canonical_path_dir(self):
         # check it works when asked for just the directory portion.
         work_tree = self._make_canonical_test_tree()
-        self.assertEqual(work_tree.get_canonical_inventory_path('Dir'), 'dir')
+        self.assertEqual('dir', work_tree.get_canonical_inventory_path('Dir'))
 
     def test_canonical_path_root(self):
         work_tree = self._make_canonical_test_tree()
-        self.assertEqual(work_tree.get_canonical_inventory_path(''), '')
-        self.assertEqual(work_tree.get_canonical_inventory_path('/'), '/')
+        self.assertEqual('', work_tree.get_canonical_inventory_path(''))
+        self.assertEqual('/', work_tree.get_canonical_inventory_path('/'))
 
     def test_canonical_path_invalid_all(self):
         work_tree = self._make_canonical_test_tree()
-        self.assertEqual(work_tree.get_canonical_inventory_path('foo/bar'), 'foo/bar')
+        self.assertEqual('foo/bar',
+                         work_tree.get_canonical_inventory_path('foo/bar'))
 
     def test_canonical_invalid_child(self):
         work_tree = self._make_canonical_test_tree()
-        self.assertEqual(work_tree.get_canonical_inventory_path('Dir/None'), 'dir/None')
+        self.assertEqual('dir/None',
+                         work_tree.get_canonical_inventory_path('Dir/None'))

=== modified file 'bzrlib/tests/tree_implementations/test_path_content_summary.py'
--- a/bzrlib/tests/tree_implementations/test_path_content_summary.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/test_path_content_summary.py	2009-04-11 16:06:53 +0000
@@ -18,21 +18,24 @@
 
 import os
 
-from bzrlib.osutils import supports_executable, _fs_enc
-from bzrlib.tests import SymlinkFeature, TestSkipped, TestNotApplicable
-from bzrlib.tests.tree_implementations import TestCaseWithTree
-
-
-class TestPathContentSummary(TestCaseWithTree):
+from bzrlib import (
+    osutils,
+    tests,
+    )
+
+from bzrlib.tests import tree_implementations
+
+
+class TestPathContentSummary(tree_implementations.TestCaseWithTree):
 
     def _convert_tree(self, tree):
-        result = TestCaseWithTree._convert_tree(self, tree)
+        result = tree_implementations.TestCaseWithTree._convert_tree(self, tree)
         result.lock_read()
         self.addCleanup(result.unlock)
         return result
 
     def test_symlink_content_summary(self):
-        self.requireFeature(SymlinkFeature)
+        self.requireFeature(tests.SymlinkFeature)
         tree = self.make_branch_and_tree('tree')
         os.symlink('target', 'tree/path')
         tree.add(['path'])
@@ -40,27 +43,19 @@
         self.assertEqual(('symlink', None, None, 'target'), summary)
 
     def test_unicode_symlink_content_summary(self):
-        self.requireFeature(SymlinkFeature)
+        self.requireFeature(tests.SymlinkFeature)
+        self.requireFeature(tests.UnicodeFilenameFeature)
         tree = self.make_branch_and_tree('tree')
-        try:
-            os.symlink('target', u'tree/\u03b2-path'.encode(_fs_enc))
-        except UnicodeError:
-            raise TestSkipped(
-                'This platform does not support unicode file paths.')
-
+        os.symlink('target', u'tree/\u03b2-path'.encode(osutils._fs_enc))
         tree.add([u'\u03b2-path'])
         summary = self._convert_tree(tree).path_content_summary(u'\u03b2-path')
         self.assertEqual(('symlink', None, None, 'target'), summary)
 
     def test_unicode_symlink_target_summary(self):
-        self.requireFeature(SymlinkFeature)
+        self.requireFeature(tests.SymlinkFeature)
+        self.requireFeature(tests.UnicodeFilenameFeature)
         tree = self.make_branch_and_tree('tree')
-        try:
-            os.symlink(u'tree/\u03b2-path'.encode(_fs_enc), 'tree/link')
-        except UnicodeError:
-            raise TestSkipped(
-                'This platform does not support unicode file paths.')
-
+        os.symlink(u'tree/\u03b2-path'.encode(osutils._fs_enc), 'tree/link')
         tree.add(['link'])
         summary = self._convert_tree(tree).path_content_summary('link')
         self.assertEqual(('symlink', None, None, u'tree/\u03b2-path'), summary)
@@ -71,8 +66,8 @@
         self.assertEqual(('missing', None, None, None), summary)
 
     def test_file_content_summary_executable(self):
-        if not supports_executable():
-            raise TestNotApplicable()
+        if not osutils.supports_executable():
+            raise tests.TestNotApplicable()
         tree = self.make_branch_and_tree('tree')
         self.build_tree(['tree/path'])
         tree.add(['path'])
@@ -99,7 +94,7 @@
         # size must be known
         self.assertEqual(22, summary[1])
         # not executable
-        if supports_executable:
+        if osutils.supports_executable:
             self.assertEqual(False, summary[2])
         else:
             self.assertEqual(None, summary[2])
@@ -119,7 +114,7 @@
         subtree = self.make_branch_and_tree('tree/path')
         tree.add(['path'])
         if not tree.branch.repository._format.supports_tree_reference:
-            raise TestSkipped("Tree references not supported.")
+            raise tests.TestNotApplicable("Tree references not supported.")
         summary = self._convert_tree(tree).path_content_summary('path')
         self.assertEqual(4, len(summary))
         self.assertEqual('tree-reference', summary[0])

=== modified file 'bzrlib/tests/tree_implementations/test_test_trees.py'
--- a/bzrlib/tests/tree_implementations/test_test_trees.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/test_test_trees.py	2009-04-11 16:06:53 +0000
@@ -16,11 +16,11 @@
 
 """Tests for the test trees used by the tree_implementations tests."""
 
-from bzrlib.tests import SymlinkFeature
-from bzrlib.tests.tree_implementations import TestCaseWithTree
-
-
-class TestTreeShapes(TestCaseWithTree):
+from bzrlib import tests
+from bzrlib.tests import tree_implementations
+
+
+class TestTreeShapes(tree_implementations.TestCaseWithTree):
 
     def test_empty_tree_no_parents(self):
         tree = self.make_branch_and_tree('.')
@@ -147,7 +147,7 @@
         # currently this test tree requires unicode. It might be good
         # to have it simply stop having the single unicode file in it
         # when dealing with a non-unicode filesystem.
-        self.requireFeature(SymlinkFeature)
+        self.requireFeature(tests.SymlinkFeature)
         tree = self.get_tree_with_subdirs_and_all_content_types()
         tree.lock_read()
         self.addCleanup(tree.unlock)

=== modified file 'bzrlib/tests/tree_implementations/test_walkdirs.py'
--- a/bzrlib/tests/tree_implementations/test_walkdirs.py	2009-03-23 14:59:43 +0000
+++ b/bzrlib/tests/tree_implementations/test_walkdirs.py	2009-04-11 16:06:53 +0000
@@ -26,44 +26,31 @@
 class TestWalkdirs(TestCaseWithTree):
 
     def get_all_subdirs_expected(self, tree, symlinks):
+        dirblocks = [
+            (('', tree.path2id('')),
+             [('0file', '0file', 'file', None, '2file', 'file'),
+              ('1top-dir', '1top-dir', 'directory', None,
+               '1top-dir', 'directory'),
+              (u'2utf\u1234file', u'2utf\u1234file', 'file', None,
+               u'0utf\u1234file'.encode('utf8'), 'file'),
+              ]),
+            (('1top-dir', '1top-dir'),
+             [('1top-dir/0file-in-1topdir', '0file-in-1topdir',
+               'file', None, '1file-in-1topdir', 'file'),
+              ('1top-dir/1dir-in-1topdir', '1dir-in-1topdir',
+               'directory', None, '0dir-in-1topdir', 'directory'),
+              ]),
+            (('1top-dir/1dir-in-1topdir', '0dir-in-1topdir'),
+             []),
+            ]
         if symlinks:
-            return [
-                (('', tree.path2id('')),
-                [
-                 ('0file', '0file', 'file', None, '2file', 'file'),
-                 ('1top-dir', '1top-dir', 'directory', None, '1top-dir', 'directory'),
-                 (u'2utf\u1234file', u'2utf\u1234file', 'file', None,
-                                         u'0utf\u1234file'.encode('utf8'), 'file'),
-                 ('symlink', 'symlink', 'symlink', None, 'symlink', 'symlink')
-                ]),
-                (('1top-dir', '1top-dir'),
-                [('1top-dir/0file-in-1topdir', '0file-in-1topdir', 'file', None, '1file-in-1topdir', 'file'),
-                 ('1top-dir/1dir-in-1topdir', '1dir-in-1topdir', 'directory', None, '0dir-in-1topdir', 'directory'),
-                ]),
-                (('1top-dir/1dir-in-1topdir', '0dir-in-1topdir'),
-                [
-                ]),
-                ]
-        else:
-            return [
-                (('', tree.path2id('')),
-                [
-                 ('0file', '0file', 'file', None, '2file', 'file'),
-                 ('1top-dir', '1top-dir', 'directory', None, '1top-dir', 'directory'),
-                 (u'2utf\u1234file', u'2utf\u1234file', 'file', None,
-                                         u'0utf\u1234file'.encode('utf8'), 'file'),
-                ]),
-                (('1top-dir', '1top-dir'),
-                [('1top-dir/0file-in-1topdir', '0file-in-1topdir', 'file', None, '1file-in-1topdir', 'file'),
-                 ('1top-dir/1dir-in-1topdir', '1dir-in-1topdir', 'directory', None, '0dir-in-1topdir', 'directory'),
-                ]),
-                (('1top-dir/1dir-in-1topdir', '0dir-in-1topdir'),
-                [
-                ]),
-                ]
+            dirblocks[0][1].append(('symlink', 'symlink', 'symlink', None,
+                                    'symlink', 'symlink'))
+        return dirblocks
 
     def test_walkdir_root(self):
-        tree = self.get_tree_with_subdirs_and_all_supported_content_types(has_symlinks())
+        tree = self.get_tree_with_subdirs_and_all_supported_content_types(
+            has_symlinks())
         tree.lock_read()
         expected_dirblocks = self.get_all_subdirs_expected(tree, has_symlinks())
         # test that its iterable by iterating

=== modified file 'bzrlib/tests/workingtree_implementations/__init__.py'
--- a/bzrlib/tests/workingtree_implementations/__init__.py	2009-03-27 14:22:25 +0000
+++ b/bzrlib/tests/workingtree_implementations/__init__.py	2009-04-11 16:06:53 +0000
@@ -22,36 +22,26 @@
 rather than in tests/workingtree_implementations/*.py.
 """
 
-import bzrlib.errors as errors
-from bzrlib.transport import get_transport
-from bzrlib.tests import (
-                          default_transport,
-                          multiply_tests,
-                          )
-from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
-from bzrlib.workingtree import (WorkingTreeFormat,
-                                _legacy_formats,
-                                )
+from bzrlib import (
+    errors,
+    tests,
+    workingtree,
+    )
+from bzrlib.tests import bzrdir_implementations
 
 
 def make_scenarios(transport_server, transport_readonly_server, formats):
-    """Create a scenario for the specified converter
-
-    :param workingtree_format: The particular workingtree format to test.
-    :param bzrdir_format: The bzrdir format to test.
-    :return: a (name, options) tuple, where options is a dict of values
-        to be used as members of the TestCase.
-    """
     result = []
     for workingtree_format in formats:
         result.append((workingtree_format.__class__.__name__,
-            make_scenario(transport_server, transport_readonly_server,
-            workingtree_format)))
+                       make_scenario(transport_server,
+                                     transport_readonly_server,
+                                     workingtree_format)))
     return result
 
 
 def make_scenario(transport_server, transport_readonly_server,
-    workingtree_format):
+                  workingtree_format):
     return {
         "transport_server": transport_server,
         "transport_readonly_server": transport_readonly_server,
@@ -60,7 +50,7 @@
         }
 
 
-class TestCaseWithWorkingTree(TestCaseWithBzrDir):
+class TestCaseWithWorkingTree(bzrdir_implementations.TestCaseWithBzrDir):
 
     def make_branch_and_tree(self, relpath, format=None):
         made_control = self.make_bzrdir(relpath, format=format)
@@ -112,13 +102,14 @@
         ]
 
     scenarios = make_scenarios(
-        default_transport,
+        tests.default_transport,
         # None here will cause a readonly decorator to be created
         # by the TestCaseWithTransport.get_readonly_transport method.
         None,
-        WorkingTreeFormat._formats.values() + _legacy_formats)
+        workingtree.WorkingTreeFormat._formats.values()
+        + workingtree._legacy_formats)
 
     # add the tests for the sub modules
-    return multiply_tests(
+    return tests.multiply_tests(
         loader.loadTestsFromModuleNames(test_workingtree_implementations),
         scenarios, standard_tests)



More information about the bazaar-commits mailing list