Log message for revision 69930: Made runalltests skip 'tests.py' when running ZTC tests.
Changed: U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py U Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py -=- Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py =================================================================== --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:38:10 UTC (rev 69929) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/runalltests.py 2006-09-02 14:40:19 UTC (rev 69930) @@ -27,12 +27,16 @@ import unittest TestRunner = unittest.TextTestRunner suite = unittest.TestSuite() +cwd = os.getcwd() def test_finder(recurse, dir, names): if dir == os.curdir or '__init__.py' in names: parts = [x for x in dir[len(os.curdir):].split(os.sep) if x] tests = [x for x in names if x.startswith('test') and x.endswith('.py')] for test in tests: + if test == 'tests.py' and 'ZopeTestCase' in cwd: + # Skip tests.py when running ZTC tests + continue modpath = parts + [test[:-3]] m = __import__('.'.join(modpath)) for part in modpath[1:]: Modified: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py =================================================================== --- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py 2006-09-02 14:38:10 UTC (rev 69929) +++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/runalltests.py 2006-09-02 14:40:19 UTC (rev 69930) @@ -27,12 +27,16 @@ import unittest TestRunner = unittest.TextTestRunner suite = unittest.TestSuite() +cwd = os.getcwd() def test_finder(recurse, dir, names): if dir == os.curdir or '__init__.py' in names: parts = [x for x in dir[len(os.curdir):].split(os.sep) if x] tests = [x for x in names if x.startswith('test') and x.endswith('.py')] for test in tests: + if test == 'tests.py' and 'ZopeTestCase' in cwd: + # Skip tests.py when running ZTC tests + continue modpath = parts + [test[:-3]] m = __import__('.'.join(modpath)) for part in modpath[1:]: _______________________________________________ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins