diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-06-13 09:49:44 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 09:49:44 (GMT) |
commit | eb52ac89929bb09b15c014ab8ff60eee685e86c7 (patch) | |
tree | aec8a442e56ab34e748ea45c0d23082da3b771a7 /Lib/test/test_capi.py | |
parent | d79c1d4a9406384f10a37f26a7515ce79f9fdd78 (diff) | |
download | cpython-eb52ac89929bb09b15c014ab8ff60eee685e86c7.zip cpython-eb52ac89929bb09b15c014ab8ff60eee685e86c7.tar.gz cpython-eb52ac89929bb09b15c014ab8ff60eee685e86c7.tar.bz2 |
bpo-28180: Fix test_capi.test_forced_io_encoding() (#2155)
Don't run Python in an empty environment, but copy the current
environment and set PYTHONIOENCODING. So the test works also on
Python compiled in shared mode (using libpython).
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r-- | Lib/test/test_capi.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index c4a9766..1cf5cd7 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -480,7 +480,7 @@ class EmbeddingTests(unittest.TestCase): def test_forced_io_encoding(self): # Checks forced configuration of embedded interpreter IO streams - env = {"PYTHONIOENCODING": "utf-8:surrogateescape"} + env = dict(os.environ, PYTHONIOENCODING="utf-8:surrogateescape") out, err = self.run_embedded_interpreter("forced_io_encoding", env=env) if support.verbose > 1: print() |