summaryrefslogtreecommitdiff
path: root/tests/test_process.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-10-31 12:02:49 -0400
committerNed Batchelder <ned@nedbatchelder.com>2015-10-31 12:02:49 -0400
commit4c19e2aee48069568020d4e923ba85a4ea599d15 (patch)
tree57a8d3e73ef0174524bbf8fde4fbc86ed6667faa /tests/test_process.py
parente6f0a4e607e1f70315957034db4ac672421ae263 (diff)
downloadpython-coveragepy-git-4c19e2aee48069568020d4e923ba85a4ea599d15.tar.gz
Try a different strategy for setting and testing output encodings
Diffstat (limited to 'tests/test_process.py')
-rw-r--r--tests/test_process.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_process.py b/tests/test_process.py
index e1bd2bf3..a69fd356 100644
--- a/tests/test_process.py
+++ b/tests/test_process.py
@@ -13,6 +13,7 @@ import textwrap
import coverage
from coverage import env, CoverageData
+from coverage.misc import output_encoding
from tests.coveragetest import CoverageTest
@@ -916,7 +917,7 @@ class UnicodeFilePathsTest(CoverageTest):
)
if env.PY2:
- report_expected = report_expected.encode(sys.__stdout__.encoding)
+ report_expected = report_expected.encode(output_encoding())
out = self.run_command("coverage report")
self.assertEqual(out, report_expected)
@@ -954,7 +955,7 @@ class UnicodeFilePathsTest(CoverageTest):
)
if env.PY2:
- report_expected = report_expected.encode(sys.__stdout__.encoding)
+ report_expected = report_expected.encode(output_encoding())
out = self.run_command("coverage report")
self.assertEqual(out, report_expected)