bpo-41094: Additional fix for PYTHONSTARTUP. (GH-21119)
(cherry picked from commit a7dc71470156680f1fd5243290c6d377824b7ef4)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index e4fed51..4d29f2c 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -1353,7 +1353,7 @@
returncode=1)
def test_audit_run_interactivehook(self):
- startup = os.path.join(self.oldcwd, support.TESTFN) + (support.TESTFN or '') + ".py"
+ startup = os.path.join(self.oldcwd, support.TESTFN) + (support.FS_NONASCII or '') + ".py"
with open(startup, "w", encoding="utf-8") as f:
print("import sys", file=f)
print("sys.__interactivehook__ = lambda: None", file=f)
@@ -1366,7 +1366,7 @@
os.unlink(startup)
def test_audit_run_startup(self):
- startup = os.path.join(self.oldcwd, support.TESTFN) + (support.TESTFN or '') + ".py"
+ startup = os.path.join(self.oldcwd, support.TESTFN) + (support.FS_NONASCII or '') + ".py"
with open(startup, "w", encoding="utf-8") as f:
print("pass", file=f)
try: