Commit 6b45a238 authored by matt@zope.com's avatar matt@zope.com

Modify testrunner to append the module's local directory to the system path,

so it can find local modules
parent 6ff44a9e
......@@ -54,9 +54,11 @@ class TestRunner:
file, pathname, desc=imp.find_module(name, [path])
saved_syspath = sys.path[:]
try:
sys.path.append(path) # let module find things in its dir
module=imp.load_module(name, file, pathname, desc)
finally:
file.close()
sys.path.pop() # Remove module level path
sys.path[:] = saved_syspath
function=getattr(module, 'test_suite', None)
if function is None:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment