mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
[3.9] bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035). (GH-21156)
(cherry picked from commit 700cfa8c90
)
This commit is contained in:
parent
ad7a66731f
commit
f925407a19
23 changed files with 108 additions and 76 deletions
|
@ -1353,7 +1353,7 @@ class AuditingTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
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 @@ class AuditingTests(EmbeddingTestsMixin, unittest.TestCase):
|
|||
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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue