diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py index c4a97664290..1cf5cd73f09 100644 --- a/Lib/test/test_capi.py +++ b/Lib/test/test_capi.py @@ -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()