fixed double-loading of test modules

--HG--
extra : convert_revision : svn%3A41726ec3-264d-0410-9c23-a9f1637257cc/trunk%4070
This commit is contained in:
adrian.sampson 2008-07-07 05:25:14 +00:00
parent cd124d2dad
commit c5e06b6f73

View file

@ -7,7 +7,7 @@ def suite():
s = unittest.TestSuite() s = unittest.TestSuite()
# get the suite() of every module in this directory begining with test_ # get the suite() of every module in this directory begining with test_
for fname in os.listdir('.'): for fname in os.listdir('.'):
match = re.match(r'(test_\S+)\.py', fname) match = re.match(r'(test_\S+)\.py$', fname)
if match: if match:
s.addTest(__import__(match.group(1)).suite()) s.addTest(__import__(match.group(1)).suite())
return s return s