Rev 3: Merge the two u1dbtest changes. in http://bzr.arbash-meinel.com/plugins/u1dbtest

John Arbash Meinel john at arbash-meinel.com
Wed Jan 11 13:37:56 UTC 2012


At http://bzr.arbash-meinel.com/plugins/u1dbtest

------------------------------------------------------------
revno: 3 [merge]
revision-id: john at arbash-meinel.com-20120111133807-qa4etn50xvuc02ug
parent: john at arbash-meinel.com-20111128152524-545ve537n1gbnoz3
parent: john at arbash-meinel.com-20111123115721-y6b37jp8hgxo8f2b
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: u1dbtest
timestamp: Wed 2012-01-11 14:38:07 +0100
message:
  Merge the two u1dbtest changes.
modified:
  __init__.py                    __init__.py-20111104160236-srhlvzee0br0ssbs-1
-------------- next part --------------
=== modified file '__init__.py'
--- a/__init__.py	2011-11-28 15:25:24 +0000
+++ b/__init__.py	2012-01-11 13:38:07 +0000
@@ -51,10 +51,10 @@
                         help='Output test progress via subunit.'),
                      Option('load-list', type=str, argname='TESTLISTFILE',
                             help='Load a test id list from a text file.'),
-                     # ListOption('starting-with', type=str, argname='TESTID',
-                     #            param_name='starting_with', short_name='s',
-                     #            help=
-                     #            'Load only the tests starting with TESTID.'),
+                     ListOption('starting-with', type=str, argname='TESTID',
+                                param_name='starting_with', short_name='s',
+                                help=
+                                'Load only the tests starting with TESTID.'),
                      ]
     encoding_type = 'replace'
 
@@ -62,8 +62,11 @@
             first=False, list_only=False,
             randomize=None, exclude=None, strict=False,
             load_list=None, starting_with=None, subunit=False,
-            lsprof_tests=False):
+            lsprof_tests=False, parallel=None):
         from bzrlib import tests, lazy_regex
+        tests.test_prefix_alias_registry.register('u1db', 'u1db')
+        tests.test_prefix_alias_registry.register('u', 'u1db')
+        tests.test_prefix_alias_registry.register('ut', 'u1db.tests')
 
         self.additional_selftest_args = {}
         if testspecs_list is not None:
@@ -88,6 +91,9 @@
         # string or a re class.
         # So disable it before we load any u1db code.
         lazy_regex.reset_compile()
+        if parallel:
+            self.additional_selftest_args.setdefault(
+                'suite_decorators', []).append(parallel)
         def test_suite_factory():
             loader = testtools.run.defaultTestLoaderCls()
             return loader.discover('.', 'test*.py', '.')



More information about the bazaar-commits mailing list