[Zope-Checkins] CVS: Releases/Zope/utilities - testrunner.py:1.20

Matthew T. Kromer matt@zope.com
Mon, 26 Nov 2001 11:10:03 -0500


Update of /cvs-repository/Releases/Zope/utilities
In directory cvs.zope.org:/tmp/cvs-serv22126/utilities

Modified Files:
	testrunner.py 
Log Message:
Modify testrunner to append the module's local directory to the system path,
so it can find local modules


=== Releases/Zope/utilities/testrunner.py 1.19 => 1.20 ===
         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: