diff options
Diffstat (limited to 'test/runtest/simple/fail.py')
-rw-r--r-- | test/runtest/simple/fail.py | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/test/runtest/simple/fail.py b/test/runtest/simple/fail.py index f060f50..4a36c47 100644 --- a/test/runtest/simple/fail.py +++ b/test/runtest/simple/fail.py @@ -30,36 +30,27 @@ Test how we handle a failing test specified on the command line. import TestRuntest +python = TestRuntest.python + test = TestRuntest.TestRuntest() test.subdir('test') test.write_failing_test(['test', 'fail.py']) -# NOTE: The "test/fail.py : FAIL" line has spaces at the end. - -expect = r"""qmtest run --output results.qmr --format none --result-stream="scons_tdb.AegisChangeStream" test/fail.py ---- TEST RESULTS ------------------------------------------------------------- - - test/fail.py : FAIL - - FAILING TEST STDOUT - - FAILING TEST STDERR - ---- TESTS THAT DID NOT PASS -------------------------------------------------- - - test/fail.py : FAIL - - ---- STATISTICS --------------------------------------------------------------- - - 1 tests total +expect_stdout = """\ +%(python)s -tt test/fail.py +FAILING TEST STDOUT +""" % locals() - 1 (100%) tests FAIL +expect_stderr = """\ +FAILING TEST STDERR """ -test.run(arguments = 'test/fail.py', status = 1, stdout = expect) +test.run(arguments='test/fail.py', + status=1, + stdout=expect_stdout, + stderr=expect_stderr) test.pass_test() |