summaryrefslogtreecommitdiff
path: root/testing/test_capture.py
diff options
context:
space:
mode:
Diffstat (limited to 'testing/test_capture.py')
-rw-r--r--testing/test_capture.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/testing/test_capture.py b/testing/test_capture.py
index 302a02d10..4e1323e4b 100644
--- a/testing/test_capture.py
+++ b/testing/test_capture.py
@@ -1040,6 +1040,15 @@ def test_capture_not_started_but_reset():
capsys.stop_capturing()
+def test_using_capsys_fixture_works_with_sys_stdout_encoding(capsys):
+ test_text = 'test text'
+
+ print(test_text.encode(sys.stdout.encoding, 'replace'))
+ (out, err) = capsys.readouterr()
+ assert out
+ assert err == ''
+
+
@needsosdup
@pytest.mark.parametrize('use', [True, False])
def test_fdcapture_tmpfile_remains_the_same(tmpfile, use):