mirror of https://github.com/python/cpython.git
gh-96189: Fix test_invalid_utf8 on a number of build bots (GH-96190)
The clearing of the temporary directory is not working on some platforms and leaving behind files. This has been updated to use the pattern in test_cmd_line.py [1] using the special TESTFN rather than a test directory. [1] https://github.com/python/cpython/blob/main/Lib/test/test_cmd_line.py#L559
This commit is contained in:
parent
e046cf872e
commit
054328f0dd
|
@ -239,8 +239,8 @@ def test_invalid_utf8(self):
|
|||
# it's an otherwise valid Python source file.
|
||||
template = b'"%s"\n'
|
||||
|
||||
with tempfile.TemporaryDirectory() as tmpd:
|
||||
fn = os.path.join(tmpd, 'test.py')
|
||||
fn = TESTFN
|
||||
self.addCleanup(unlink, fn)
|
||||
|
||||
def check(content):
|
||||
with open(fn, 'wb') as fp:
|
||||
|
|
Loading…
Reference in New Issue