summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xall_tests.py11
-rw-r--r--test/__init__.py5
2 files changed, 16 insertions, 0 deletions
diff --git a/all_tests.py b/all_tests.py
new file mode 100755
index 00000000..b408b5de
--- /dev/null
+++ b/all_tests.py
@@ -0,0 +1,11 @@
+#!/usr/bin/python3
+import unittest
+from test import *
+
+tests = []
+for key, val in vars().copy().items():
+	if key.startswith('tc_'):
+		tests.extend(v for k,v in vars(val).items() if type(v) == type)
+
+suite = unittest.TestSuite(map(unittest.makeSuite, tests))
+unittest.TextTestRunner(verbosity=2).run(suite)
diff --git a/test/__init__.py b/test/__init__.py
index e69de29b..4f1c736a 100644
--- a/test/__init__.py
+++ b/test/__init__.py
@@ -0,0 +1,5 @@
+import os, sys
+
+__all__ = [ x[0:x.index('.')] \
+		for x in os.listdir(os.path.dirname(__file__)) \
+		if x.startswith('tc_') ]