Revert "test: added directory option to planpythontestsuite()"
authorJelmer Vernooij <jelmer@samba.org>
Thu, 10 Nov 2011 12:46:01 +0000 (13:46 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Thu, 10 Nov 2011 22:37:04 +0000 (23:37 +0100)
This reverts commit b0be72d5080aed3da3f33a45b72f88e90fbe3d13.

I'll add an alternative that uses subunit.run.

selftest/selftesthelpers.py

index 58a2f0f5d67b85229b399350011be76cc5d43a3b..085c62c46602b38ef15c76bf565b700977dfe174 100644 (file)
@@ -158,17 +158,10 @@ def planperltestsuite(name, path):
         skiptestsuite(name, "Test::More not available")
 
 
-def planpythontestsuite(env, module, name=None, directory=None):
-
-    if name is None:
-        name = module
+def planpythontestsuite(env, module):
     if has_system_subunit_run:
-        cmd = [python, "-m", "subunit.run", "$LISTOPT", module]
-        if directory is not None:
-            cmd.extend(['-D', directory])
-        plantestsuite_idlist(name, env, cmd)
+        plantestsuite_idlist(module, env, [python, "-m", "subunit.run", "$LISTOPT", module])
     else:
-        cmd = "PYTHONPATH=$PYTHONPATH:%s/lib/subunit/python:%s/lib/testtools %s -m subunit.run $LISTOPT %s" % (srcdir(), srcdir(), python, module)
-        if directory is not None:
-            cmd += ' -D %s' % directory
-        plantestsuite_idlist(name, env, cmd)
+        plantestsuite_idlist(module, env, "PYTHONPATH=$PYTHONPATH:%s/lib/subunit/python:%s/lib/testtools %s -m subunit.run $LISTOPT %s" % (srcdir(), srcdir(), python, module))
+
+