Skip to content

Commit 96bb4c3

Browse files
committed
fix test
1 parent 1dee9b1 commit 96bb4c3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/testsuite.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33

44
"""Executable module to test unittest-xml-reporting.
55
"""
6+
from __future__ import print_function
7+
68
import contextlib
79
import io
810
import sys
@@ -121,6 +123,10 @@ def test_non_ascii_error(self):
121123
def test_unsafe_unicode(self):
122124
print(u"A\x00B\x08C\x0BD\x0C")
123125

126+
def test_output_stdout_and_stderr(self):
127+
print('test on stdout')
128+
print('test on stderr', file=sys.stderr)
129+
124130
def test_runner_buffer_output_pass(self):
125131
print('should not be printed')
126132

@@ -517,6 +523,7 @@ def test_junitxml_xsd_validation_order(self):
517523
suite = unittest.TestSuite()
518524
suite.addTest(self.DummyTest('test_fail'))
519525
suite.addTest(self.DummyTest('test_pass'))
526+
suite.addTest(self.DummyTest('test_output_stdout_and_stderr'))
520527
suite.properties = dict(key='value')
521528
outdir = BytesIO()
522529
runner = xmlrunner.XMLTestRunner(

0 commit comments

Comments
 (0)