From 8ea8683f72fbd460507b987ca27a859a8a8da3c0 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 10 Nov 2011 20:24:17 +0100 Subject: selftest: Allow passing arbitrary number of additional python path values. --- selftest/selftesthelpers.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'selftest/selftesthelpers.py') diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index c0b5d0d46c..c041c26f35 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -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])) -- cgit