[Zope-Checkins]
SVN: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py
ditto
david whitfield Morriss
whit at openplans.org
Mon Aug 28 17:35:46 EDT 2006
Log message for revision 69822:
ditto
Changed:
A Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py
-=-
Added: Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py
===================================================================
--- Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py 2006-08-28 21:35:10 UTC (rev 69821)
+++ Zope/branches/2.10/lib/python/Testing/ZopeTestCase/tests.py 2006-08-28 21:35:41 UTC (rev 69822)
@@ -0,0 +1,22 @@
+"""test runner that works with zope.testing.testrunner"""
+import unittest
+import os, sys
+
+import os, sys
+
+suite = unittest.TestSuite()
+
+names = os.listdir(os.path.dirname(__file__))
+tests = [x[:-3] for x in names \
+ if x.startswith('test') and x.endswith('.py') \
+ and not x == 'tests.py']
+
+import Testing.ZopeTestCase
+for test in tests:
+ m = __import__("Testing.ZopeTestCase.%s" %test)
+ m = getattr(Testing.ZopeTestCase, test)
+ if hasattr(m, 'test_suite'):
+ suite.addTest(m.test_suite())
+
+def test_suite():
+ return suite
More information about the Zope-Checkins
mailing list