summaryrefslogtreecommitdiff
path: root/tests/test_testing.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_testing.py')
-rw-r--r--tests/test_testing.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_testing.py b/tests/test_testing.py
index eae18890..37130074 100644
--- a/tests/test_testing.py
+++ b/tests/test_testing.py
@@ -203,6 +203,15 @@ class CoverageTestTest(CoverageTest):
assert "StdOut\n" in out
assert "StdErr\n" in out
+ def test_stdout(self):
+ # stdout is captured.
+ print("This is stdout")
+ print("Line 2")
+ assert self.stdout() == "This is stdout\nLine 2\n"
+ # When we grab stdout(), it's reset.
+ print("Some more")
+ assert self.stdout() == "Some more\n"
+
class CheckUniqueFilenamesTest(CoverageTest):
"""Tests of CheckUniqueFilenames."""