diff options
Diffstat (limited to 'tests/test_testing.py')
-rw-r--r-- | tests/test_testing.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_testing.py b/tests/test_testing.py index 15e6f84f..cf3e2014 100644 --- a/tests/test_testing.py +++ b/tests/test_testing.py @@ -205,6 +205,17 @@ class CoverageTestTest(CoverageTest): _, _, environ = environ.rpartition(":") self.assertEqual(environ.strip(), "COV_FOOBAR = XYZZY") + def test_run_command_stdout_stderr(self): + # run_command should give us both stdout and stderr. + self.make_file("outputs.py", """\ + import sys + sys.stderr.write("StdErr\\n") + print("StdOut") + """) + out = self.run_command("python outputs.py") + self.assertIn("StdOut\n", out) + self.assertIn("StdErr\n", out) + class CheckUniqueFilenamesTest(CoverageTest): """Tests of CheckUniqueFilenames.""" |