diff options
Diffstat (limited to 'test/runtest/simple')
-rw-r--r-- | test/runtest/simple/combined.py | 28 | ||||
-rw-r--r-- | test/runtest/simple/fail.py | 4 | ||||
-rw-r--r-- | test/runtest/simple/no_result.py | 4 | ||||
-rw-r--r-- | test/runtest/simple/pass.py | 4 |
4 files changed, 23 insertions, 17 deletions
diff --git a/test/runtest/simple/combined.py b/test/runtest/simple/combined.py index 1640d94..58d2f27 100644 --- a/test/runtest/simple/combined.py +++ b/test/runtest/simple/combined.py @@ -30,10 +30,16 @@ Test a combination of a passing test, failing test, and no-result test with no argument on the command line. """ +import os.path + import TestRuntest test = TestRuntest.TestRuntest() +test_fail_py = os.path.join('test', 'fail.py') +test_no_result_py = os.path.join('test', 'no_result.py') +test_pass_py = os.path.join('test', 'pass.py') + test.subdir('test') test.write_failing_test(['test', 'fail.py']) @@ -45,39 +51,39 @@ test.write_passing_test(['test', 'pass.py']) # NOTE: The "test/fail.py : FAIL" and "test/pass.py : PASS" lines both # have spaces at the end. -expect = r"""qmtest.py run --output results.qmr --format none --result-stream=scons_tdb.AegisChangeStream test +expect = r"""qmtest.py run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" test --- TEST RESULTS ------------------------------------------------------------- - test/fail.py : FAIL + %(test_fail_py)s : FAIL FAILING TEST STDOUT FAILING TEST STDERR - test/no_result.py : NO_RESULT + %(test_no_result_py)s : NO_RESULT NO RESULT TEST STDOUT NO RESULT TEST STDERR - test/pass.py : PASS + %(test_pass_py)s : PASS --- TESTS THAT DID NOT PASS -------------------------------------------------- - test/fail.py : FAIL + %(test_fail_py)s : FAIL - test/no_result.py : NO_RESULT + %(test_no_result_py)s : NO_RESULT --- STATISTICS --------------------------------------------------------------- 3 tests total - 1 ( 33%) tests PASS - 1 ( 33%) tests FAIL - 1 ( 33%) tests NO_RESULT -""" + 1 ( 33%%) tests PASS + 1 ( 33%%) tests FAIL + 1 ( 33%%) tests NO_RESULT +""" % locals() -test.run(arguments = '--qmtest test', stdout = expect) +test.run(arguments = 'test', status = 1, stdout = expect) test.pass_test() diff --git a/test/runtest/simple/fail.py b/test/runtest/simple/fail.py index ba2cc97..ec9f532 100644 --- a/test/runtest/simple/fail.py +++ b/test/runtest/simple/fail.py @@ -38,7 +38,7 @@ test.write_failing_test(['test', 'fail.py']) # NOTE: The "test/fail.py : FAIL" line has spaces at the end. -expect = r"""qmtest.py run --output results.qmr --format none --result-stream=scons_tdb.AegisChangeStream test/fail.py +expect = r"""qmtest.py run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" test/fail.py --- TEST RESULTS ------------------------------------------------------------- test/fail.py : FAIL @@ -59,6 +59,6 @@ expect = r"""qmtest.py run --output results.qmr --format none --result-stream=sc 1 (100%) tests FAIL """ -test.run(arguments = '--qmtest test/fail.py', stdout = expect) +test.run(arguments = 'test/fail.py', status = 1, stdout = expect) test.pass_test() diff --git a/test/runtest/simple/no_result.py b/test/runtest/simple/no_result.py index 7c9687e..4ec6e78 100644 --- a/test/runtest/simple/no_result.py +++ b/test/runtest/simple/no_result.py @@ -36,7 +36,7 @@ test.subdir('test') test.write_no_result_test(['test', 'no_result.py']) -expect = r"""qmtest.py run --output results.qmr --format none --result-stream=scons_tdb.AegisChangeStream test/no_result.py +expect = r"""qmtest.py run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" test/no_result.py --- TEST RESULTS ------------------------------------------------------------- test/no_result.py : NO_RESULT @@ -57,6 +57,6 @@ expect = r"""qmtest.py run --output results.qmr --format none --result-stream=sc 1 (100%) tests NO_RESULT """ -test.run(arguments = '--qmtest test/no_result.py', stdout = expect) +test.run(arguments = 'test/no_result.py', status = 1, stdout = expect) test.pass_test() diff --git a/test/runtest/simple/pass.py b/test/runtest/simple/pass.py index 8dfc996..c3a8b02 100644 --- a/test/runtest/simple/pass.py +++ b/test/runtest/simple/pass.py @@ -38,7 +38,7 @@ test.write_passing_test(['test', 'pass.py']) # NOTE: The "test/pass.py : PASS" line has spaces at the end. -expect = r"""qmtest.py run --output results.qmr --format none --result-stream=scons_tdb.AegisChangeStream test/pass.py +expect = r"""qmtest.py run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" test/pass.py --- TEST RESULTS ------------------------------------------------------------- test/pass.py : PASS @@ -55,6 +55,6 @@ expect = r"""qmtest.py run --output results.qmr --format none --result-stream=sc 1 (100%) tests PASS """ -test.run(arguments = '--qmtest test/pass.py', stdout = expect) +test.run(arguments = 'test/pass.py', stdout = expect) test.pass_test() |