[3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035). (GH-21156)
(cherry picked from commit 700cfa8c90a90016638bac13c4efd03786b2b2a0)
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 4d29f2c..b7b7058 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.FS_NONASCII or '') + ".py"
+ startup = os.path.join(self.oldcwd, support.TESTFN) + ".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.FS_NONASCII or '') + ".py"
+ startup = os.path.join(self.oldcwd, support.TESTFN) + ".py"
with open(startup, "w", encoding="utf-8") as f:
print("pass", file=f)
try: