[3.11] gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443) (#106445)

gh-104683: Rename Lib/test/clinic.test as Lib/test/clinic.test.c (GH-106443)
(cherry picked from commit a941bd6c53)

Co-authored-by: Erlend E. Aasland <erlend@python.org>
This commit is contained in:
Miss Islington (bot) 2023-07-05 02:03:25 -07:00 committed by GitHub
parent 9f8aa7a6d7
commit edb29f0fbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -1034,15 +1034,16 @@ class ClinicExternalTest(TestCase):
maxDiff = None
def test_external(self):
CLINIC_TEST = 'clinic.test.c'
# bpo-42398: Test that the destination file is left unchanged if the
# content does not change. Moreover, check also that the file
# modification time does not change in this case.
source = support.findfile('clinic.test')
source = support.findfile(CLINIC_TEST)
with open(source, 'r', encoding='utf-8') as f:
orig_contents = f.read()
with os_helper.temp_dir() as tmp_dir:
testfile = os.path.join(tmp_dir, 'clinic.test.c')
testfile = os.path.join(tmp_dir, CLINIC_TEST)
with open(testfile, 'w', encoding='utf-8') as f:
f.write(orig_contents)
old_mtime_ns = os.stat(testfile).st_mtime_ns