Rev 3327: bzrlib.tests.revisionstore_implementations switched from test_suite() to in file:///v/home/vila/src/bzr/experimental/faster-selftest/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Mar 31 16:23:08 BST 2008


At file:///v/home/vila/src/bzr/experimental/faster-selftest/

------------------------------------------------------------
revno: 3327
revision-id: v.ladeuil+lp at free.fr-20080331152304-nhhd42w8z0t1sx7j
parent: v.ladeuil+lp at free.fr-20080331151341-3z5kns4ahzwah2zc
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: use-filter-by-module-test-loader
timestamp: Mon 2008-03-31 17:23:04 +0200
message:
  bzrlib.tests.revisionstore_implementations switched from test_suite() to
  load_tests().
  
  * bzrlib/tests/revisionstore_implementations/__init__.py:
  (load_tests): Preferred to test_suite().
  
  * bzrlib/tests/__init__.py:
  (test_suite): bzrlib.tests.revisionstore_implementations moved
  from packages_to_test to testmod_names.
modified:
  bzrlib/tests/__init__.py       selftest.py-20050531073622-8d0e3c8845c97a64
  bzrlib/tests/revisionstore_implementations/__init__.py __init__.py-20060303020702-976c4186a0f99edb
-------------- next part --------------
=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2008-03-31 15:13:41 +0000
+++ b/bzrlib/tests/__init__.py	2008-03-31 15:23:04 +0000
@@ -118,13 +118,11 @@
     """
     import bzrlib.tests.inventory_implementations
     import bzrlib.tests.repository_implementations
-    import bzrlib.tests.revisionstore_implementations
     import bzrlib.tests.tree_implementations
     import bzrlib.tests.workingtree_implementations
     return [
             bzrlib.tests.inventory_implementations,
             bzrlib.tests.repository_implementations,
-            bzrlib.tests.revisionstore_implementations,
             bzrlib.tests.tree_implementations,
             bzrlib.tests.workingtree_implementations,
             ]
@@ -2652,6 +2650,7 @@
                    'bzrlib.tests.intertree_implementations',
                    'bzrlib.tests.interversionedfile_implementations',
                    'bzrlib.tests.per_lock',
+                   'bzrlib.tests.revisionstore_implementations',
                    'bzrlib.tests.test__dirstate_helpers',
                    'bzrlib.tests.test_ancestry',
                    'bzrlib.tests.test_annotate',

=== modified file 'bzrlib/tests/revisionstore_implementations/__init__.py'
--- a/bzrlib/tests/revisionstore_implementations/__init__.py	2007-06-28 06:44:36 +0000
+++ b/bzrlib/tests/revisionstore_implementations/__init__.py	2008-03-31 15:23:04 +0000
@@ -27,9 +27,7 @@
 from bzrlib.tests import (
                           adapt_modules,
                           default_transport,
-                          TestLoader,
                           TestScenarioApplier,
-                          TestSuite,
                           )
 
 
@@ -74,8 +72,11 @@
         return result
 
 
-def test_suite():
-    result = TestSuite()
+def load_tests(basic_tests, module, loader):
+    result = loader.suiteClass()
+    # add the tests for this module
+    result.addTests(basic_tests)
+
     test_revisionstore_implementations = [
         'bzrlib.tests.revisionstore_implementations.test_all',
         ]
@@ -86,6 +87,5 @@
         None,
         RevisionStoreTestProviderAdapter.default_test_list()
         )
-    loader = TestLoader()
     adapt_modules(test_revisionstore_implementations, adapter, loader, result)
     return result



More information about the bazaar-commits mailing list