changeset 61:96f2bcc37151

runtests.py the real one
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 27 May 2009 11:08:37 +0200
parents 06088bcf6ab3
children 8b75ba4a3745
files runtests.py
diffstat 1 files changed, 15 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/runtests.py	Wed May 27 11:08:37 2009 +0200
@@ -0,0 +1,15 @@
+import unittest
+import os
+import re
+
+def main():
+    tests = []
+    for f in os.listdir('pysmcl/test/unit/'):
+        if re.match(r'test_.*\.py', f):
+            m = __import__('pysmcl.test.unit.' + f[:-3], globals(), locals(), ['*'])
+            tests.append(unittest.defaultTestLoader.loadTestsFromModule(m))
+    h = unittest.TextTestRunner()
+    print h.run(unittest.TestSuite(tests))
+
+if __name__ == '__main__':
+    main()