[3.11] gh-96189: Fix test_invalid_utf8 on a number of build bots (GH-96190) (#96218)

Co-authored-by: Michael Droettboom <mdboom@gmail.com>
This commit is contained in:
Miss Islington (bot) 2022-08-23 15:28:44 -07:00 committed by GitHub
parent d7eea0f1ca
commit c01fc9d30a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -239,8 +239,8 @@ class UTF8ValidatorTest(unittest.TestCase):
# 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: