[Zope-Checkins]
SVN: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py
adding one for zopedoctests
david whitfield Morriss
whit at longnow.org
Mon Aug 28 15:52:09 EDT 2006
Log message for revision 69816:
adding one for zopedoctests
Changed:
A Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py
-=-
Added: Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py
===================================================================
--- Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py 2006-08-28 19:50:25 UTC (rev 69815)
+++ Zope/branches/2.9/lib/python/Testing/ZopeTestCase/zopedoctest/tests.py 2006-08-28 19:52:08 UTC (rev 69816)
@@ -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.zopedoctest
+for test in tests:
+ m = __import__("Testing.ZopeTestCase.zopedoctest.%s" %test)
+ m = getattr(Testing.ZopeTestCase.zopedoctest, test)
+ if hasattr(m, 'test_suite'):
+ suite.addTest(m.test_suite())
+
+def test_suite():
+ return suite
More information about the Zope-Checkins
mailing list