[PATCH 05/55] Use samba.subunit.run to run subunit tests.

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


Change-Id: Id9bdd33b7ac5e4db40ab8bef4dbe0f04c36d8da7
Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
---
 selftest/selftesthelpers.py | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)

diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index 6e387ec..3c1e6ba 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -58,13 +58,6 @@ if subprocess.call(perl + ["-e", "eval require Test::More;"]) == 0:
 else:
     has_perl_test_more = False
 
-try:
-    from subunit.run import TestProgram
-except ImportError:
-    has_system_subunit_run = False
-else:
-    has_system_subunit_run = True
-
 python = os.getenv("PYTHON", "python")
 
 # Set a default value, overridden if we find a working one on the system
@@ -166,13 +159,7 @@ def planpythontestsuite(env, module, name=None, extra_path=[]):
     if name is None:
         name = module
     pypath = list(extra_path)
-    if not has_system_subunit_run:
-        pypath.extend([
-            "%s/lib/subunit/python" % srcdir(),
-            "%s/lib/testtools" % srcdir(),
-            "%s/lib/extras" % srcdir(),
-            "%s/lib/mimeparse" % srcdir()])
-    args = [python, "-m", "subunit.run", "$LISTOPT", "$LOADLIST", module]
+    args = [python, "-m", "samba.subunit.run", "$LISTOPT", "$LOADLIST", module]
     if pypath:
         args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath))
     plantestsuite_loadlist(name, env, args)
-- 
2.1.4



More information about the samba-technical mailing list