Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-28180: Fix test_capi.test_forced_io_encoding()
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).
  • Loading branch information
vstinner committed Jun 13, 2017
commit 5a3d5ca3e1cb1a29ec7b978f73b4a1f4b90166cb
2 changes: 1 addition & 1 deletion Lib/test/test_capi.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def test_subinterps_distinct_state(self):

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()
Expand Down