summaryrefslogtreecommitdiff
path: root/functional_tests
diff options
context:
space:
mode:
authorJohn Szakmeister <john@szakmeister.net>2012-09-29 07:09:40 -0400
committerJohn Szakmeister <john@szakmeister.net>2012-10-02 15:41:21 -0400
commit17232a8adf2ed3550a998243e897994e43000dba (patch)
tree3cf58fac3a44e7300d40a0b7d73fb53ed55ca845 /functional_tests
parent908b2cda43eff9ab7a5045b6f6dfe3a718fb9afd (diff)
downloadnose-17232a8adf2ed3550a998243e897994e43000dba.tar.gz
xunit: capture stdout out into the system-out tag
Change the score of Xunit to place it before the Capture plugin. We don't want the Capture plugin to change the streams before the tests are run. At a score of 2000, that's exactly what happens, so let's make it 499 instead (Capture's score - 1). Have Xunit replace the stream with a Tee object of just swapping the stream. This allows the Capture plugin to see the data from stdout, even though we've replaced the stream, allowing it to function exactly as you would expect it to. Finally, we maintain a stack of streams, instead of just a single stream. I don't believe this is entirely necessary though.
Diffstat (limited to 'functional_tests')
-rw-r--r--functional_tests/doc_tests/test_xunit_plugin/test_skips.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/functional_tests/doc_tests/test_xunit_plugin/test_skips.rst b/functional_tests/doc_tests/test_xunit_plugin/test_skips.rst
index c0c3fbc..dd0590e 100644
--- a/functional_tests/doc_tests/test_xunit_plugin/test_skips.rst
+++ b/functional_tests/doc_tests/test_xunit_plugin/test_skips.rst
@@ -37,4 +37,4 @@ Ran 4 tests in ...s
FAILED (SKIP=1, errors=1, failures=1)
>>> open(outfile, 'r').read() # doctest: +ELLIPSIS
-'<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="4" errors="1" failures="1" skip="1"><testcase classname="test_skip" name="test_ok" time="..." /><testcase classname="test_skip" name="test_err" time="..."><error type="...Exception" message="oh no">...</error></testcase><testcase classname="test_skip" name="test_fail" time="..."><failure type="...AssertionError" message="bye">...</failure></testcase><testcase classname="test_skip" name="test_skip" time="..."><skipped type="...SkipTest" message="not me">...</skipped></testcase></testsuite>'
+'<?xml version="1.0" encoding="UTF-8"?><testsuite name="nosetests" tests="4" errors="1" failures="1" skip="1"><testcase classname="test_skip" name="test_ok" time="..."></testcase><testcase classname="test_skip" name="test_err" time="..."><error type="...Exception" message="oh no">...</error></testcase><testcase classname="test_skip" name="test_fail" time="..."><failure type="...AssertionError" message="bye">...</failure></testcase><testcase classname="test_skip" name="test_skip" time="..."><skipped type="...SkipTest" message="not me">...</skipped></testcase></testsuite>'