From b9ccccf8d1cf47c33afbbb0c05d56d7a0f5039e3 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Fri, 16 Aug 2013 18:06:24 -0500 Subject: Created a file (test_runner.py) that runs every test in the directory in a row and reports the results --- webtests/test_runner.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 webtests/test_runner.py (limited to 'webtests/test_runner.py') 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 -- cgit v1.2.3 From c5fc931621707865357ace4b637db7481e0be552 Mon Sep 17 00:00:00 2001 From: Zachary Sloan Date: Thu, 22 Aug 2013 18:18:11 -0500 Subject: Added show_trait_js_test to the tests run by test_runner Fixed the part of show_trait_js_test that checks that the style is "display: none;" --- webtests/show_trait_js_test.py | 2 +- webtests/test_runner.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'webtests/test_runner.py') diff --git a/webtests/show_trait_js_test.py b/webtests/show_trait_js_test.py index 35e6c758..0fd2c16c 100644 --- a/webtests/show_trait_js_test.py +++ b/webtests/show_trait_js_test.py @@ -31,7 +31,7 @@ title: KIN/YSM Human OFC Affy Hu-Exon 1.0 ST (Jul11) Quantile : 3081205: Display Check that the Calculate Correlations tab is closed (if javascript isn't working, it will be open) >>> test.get_element_style('''//*[@id="sectionbody3"]''') -style: "display: none;" +style: display: none; """ diff --git a/webtests/test_runner.py b/webtests/test_runner.py index d2d6339d..ef6d0d69 100644 --- a/webtests/test_runner.py +++ b/webtests/test_runner.py @@ -4,9 +4,10 @@ import unittest import doctest import glob -#tests = ("correlation_test", -# "correlation_matrix_test", -# "marker_regression_test") +tests = ("correlation_test", + "correlation_matrix_test", + "marker_regression_test", + "show_trait_js_test") def main(): -- cgit v1.2.3