Skip to content

Commit

Permalink
Implementation #2 of running other unit tests from scripts_regression…
Browse files Browse the repository at this point in the history
…_tests

Test suite: None
Test baseline: N/A
Test namelist changes: N/A
Test status: N/A

Fixes: None

User interface changes?: No

Code review: None
  • Loading branch information
billsacks committed Aug 3, 2016
1 parent de42303 commit fdfa1a5
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions utils/python/tests/scripts_regression_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,10 @@ def test_unittests(self):
# within this single unit test, but doing it this way makes it
# consistent with how we run other tests in this module.

testsuite = unittest.defaultTestLoader.discover(
start_dir = LIB_DIR,
pattern = 'test*.py')
cmd = 'python -m unittest discover'
stat, output, _ = run_cmd("%s 2>&1"%cmd, from_dir = LIB_DIR)

testrunner = unittest.TextTestRunner(buffer=False)

results = testrunner.run(testsuite)
self.assertTrue(results.wasSuccessful())
self.assertEqual(stat, 0, msg=output)

def test_cime_bisect_unit_test(self):
self.do_unit_tests("cime_bisect",from_dir=TOOLS_DIR)
Expand Down

0 comments on commit fdfa1a5

Please sign in to comment.