bpo-34325: Skip zipfile test for large timestamps when filesystem don… · python/cpython@7b41dba

Original file line numberDiff line numberDiff line change

@@ -556,7 +556,11 @@ def test_add_file_before_1980(self):

556556
557557

def test_add_file_after_2107(self):

558558

# Set atime and mtime to 2108-12-30

559-

os.utime(TESTFN, (4386268800, 4386268800))

559+

try:

560+

os.utime(TESTFN, (4386268800, 4386268800))

561+

except OverflowError:

562+

self.skipTest('Host fs cannot set timestamp to required value.')

563+
560564

with zipfile.ZipFile(TESTFN2, "w") as zipfp:

561565

self.assertRaises(struct.error, zipfp.write, TESTFN)

562566