[PATCH 03/55] subunitrun: Use new samba.subunit.run module.

Jelmer Vernooij jelmer at samba.org
Fri Feb 6 12:03:35 MST 2015


Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5
Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
---
 python/samba/tests/subunitrun.py | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)

diff --git a/python/samba/tests/subunitrun.py b/python/samba/tests/subunitrun.py
index 291e7ab..21a7115 100755
--- a/python/samba/tests/subunitrun.py
+++ b/python/samba/tests/subunitrun.py
@@ -35,16 +35,9 @@ import signal
 signal.signal(signal.SIGINT, signal.SIG_DFL)
 
 import optparse
-import samba
 import sys
-import samba.tests
-samba.ensure_external_module("subunit", "subunit/python")
-import subunit.run
 
-try:
-   from subunit.run import TestProgram as BaseTestProgram
-except ImportError:
-   from unittest import TestProgram as BaseTestProgram
+from samba.subunit.run import TestProgram as BaseTestProgram
 
 
 class SubunitOptions(optparse.OptionGroup):
@@ -69,5 +62,4 @@ class TestProgram(BaseTestProgram):
         if getattr(opts, 'load_list', None):
             args.insert(0, "--load-list=%s" % opts.load_list)
         argv = [sys.argv[0]] + args
-        super(TestProgram, self).__init__(module=module, argv=argv,
-            testRunner=subunit.run.SubunitTestRunner())
+        super(TestProgram, self).__init__(module=module, argv=argv)
-- 
2.1.4



More information about the samba-technical mailing list