aboutsummaryrefslogtreecommitdiff
path: root/webtests/test_runner.py
diff options
context:
space:
mode:
authorZachary Sloan2013-08-16 18:06:24 -0500
committerZachary Sloan2013-08-16 18:06:24 -0500
commitb9ccccf8d1cf47c33afbbb0c05d56d7a0f5039e3 (patch)
tree3e0773ff34b2020d6c121024f5ca083072e4fe0c /webtests/test_runner.py
parent99a0faffb1a42a379b72a4572088c1ad588fca3e (diff)
downloadgenenetwork2-b9ccccf8d1cf47c33afbbb0c05d56d7a0f5039e3.tar.gz
Created a file (test_runner.py) that runs every test in the
directory in a row and reports the results
Diffstat (limited to 'webtests/test_runner.py')
-rw-r--r--webtests/test_runner.py27
1 files changed, 27 insertions, 0 deletions
diff --git a/webtests/test_runner.py b/webtests/test_runner.py
new file mode 100644
index 00000000..d2d6339d
--- /dev/null
+++ b/webtests/test_runner.py
@@ -0,0 +1,27 @@
+from __future__ import absolute_import, division, print_function
+
+import unittest
+import doctest
+import glob
+
+#tests = ("correlation_test",
+# "correlation_matrix_test",
+# "marker_regression_test")
+
+
+def main():
+ tests = glob.glob("*_test.py")
+
+ suite = unittest.TestSuite()
+
+ for testname in tests:
+ test = testname.rsplit(".", 1)[0]
+ print("Test is:", test)
+ mod = __import__(test)
+ suite.addTest(doctest.DocTestSuite(mod))
+
+ runner = unittest.TextTestRunner()
+ runner.run(suite)
+
+if __name__ == '__main__':
+ main() \ No newline at end of file