64d7d11924
martynas@ ok.
18 lines
786 B
Plaintext
18 lines
786 B
Plaintext
$OpenBSD: patch-runtests_py,v 1.1 2011/03/05 22:32:32 fgsch Exp $
|
|
--- runtests.py.orig Tue Nov 16 02:29:22 2004
|
|
+++ runtests.py Fri Mar 4 22:23:11 2011
|
|
@@ -43,9 +43,11 @@ def regressionTest():
|
|
files = filter(test.search, files)
|
|
|
|
#load each test into the testsuite
|
|
- filenameToModuleName = lambda f: os.path.splitext(f)[0]
|
|
+ filenameToModuleName = lambda f: os.path.splitext(f)[0].replace('/',
|
|
+ '.')
|
|
moduleNames = map(filenameToModuleName, files)
|
|
- modules = map(__import__, moduleNames)
|
|
+ modules = map(lambda m: __import__(m, fromlist=m.split('.')[-1]),
|
|
+ moduleNames)
|
|
load = unittest.defaultTestLoader.loadTestsFromModule
|
|
return unittest.TestSuite(map(load, modules))
|
|
|