summaryrefslogtreecommitdiff
path: root/tests/test_api.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 6c322795..ea625ff1 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -520,10 +520,8 @@ class ApiTest(CoverageTest):
self.start_import_stop(cov, "hello")
cov.get_data()
- out = self.stdout()
+ out, err = self.stdouterr()
assert "Hello\n" in out
-
- err = self.stderr()
assert textwrap.dedent("""\
Coverage.py warning: Module sys has no Python source. (module-not-python)
Coverage.py warning: Module xyzzy was never imported. (module-not-imported)
@@ -544,10 +542,8 @@ class ApiTest(CoverageTest):
self.start_import_stop(cov, "hello")
cov.get_data()
- out = self.stdout()
+ out, err = self.stdouterr()
assert "Hello\n" in out
-
- err = self.stderr()
assert "Coverage.py warning: Module sys has no Python source. (module-not-python)" in err
assert "module-not-imported" not in err
assert "no-data-collected" not in err