[Checkins] SVN: zope.interface/branches/regebro-python3/src/zope/interface/tests/__init__.py Run all tests with python setup.py test.

Lennart Regebro regebro at gmail.com
Mon Mar 30 15:25:33 EDT 2009


Log message for revision 98615:
  Run all tests with python setup.py test.
  

Changed:
  U   zope.interface/branches/regebro-python3/src/zope/interface/tests/__init__.py

-=-
Modified: zope.interface/branches/regebro-python3/src/zope/interface/tests/__init__.py
===================================================================
--- zope.interface/branches/regebro-python3/src/zope/interface/tests/__init__.py	2009-03-30 19:16:22 UTC (rev 98614)
+++ zope.interface/branches/regebro-python3/src/zope/interface/tests/__init__.py	2009-03-30 19:25:33 UTC (rev 98615)
@@ -1,2 +1,16 @@
 #
 # This file is necessary to make this directory a package.
+
+import os
+import unittest
+
+
+def additional_tests():
+    suites = unittest.TestSuite()
+    for file in os.listdir(os.path.dirname(__file__)):
+        if file.endswith('.py') and file!='__init__.py':
+            name = os.path.splitext(file)[0]
+            module = __import__('.'.join((__name__, name)), fromlist=name)
+            if hasattr(module, 'test_suite'):
+                suites.addTests(module.test_suite())
+    return suites



More information about the Checkins mailing list