mirror of
https://github.com/python/cpython.git
synced 2025-07-22 18:55:22 +00:00
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).
This commit is contained in:
parent
d79c1d4a94
commit
eb52ac8992
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue