selftest: Allow passing arbitrary number of additional python path values.
[mat/samba.git] / selftest / selftesthelpers.py
index c0b5d0d46c86cdcccdcffe2565f0d17c07d77f64..c041c26f35ca7c637c2f313298fb69478e7df8c0 100644 (file)
@@ -158,13 +158,11 @@ def planperltestsuite(name, path):
         skiptestsuite(name, "Test::More not available")
 
 
-def planpythontestsuite(env, module, name=None, directory=None):
-    pypath = []
+def planpythontestsuite(env, module, name=None, extra_path=[]):
+    pypath = list(extra_path)
     if not has_system_subunit_run:
         pypath.extend(["%s/lib/subunit/python" % srcdir(),
             "%s/lib/testtools" % srcdir()])
-    if directory is not None:
-        pypath.append(directory)
     args = [python, "-m", "subunit.run", "$LISTOPT", module]
     if pypath:
         args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath]))