mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-34325: Skip zipfile test for large timestamps when filesystem don't support them. (GH-8656)
When the filesystem doesn't support files with large timestamps, skip testing that such files can be zipped.
This commit is contained in:
parent
caba55b3b7
commit
7b41dbad78
1 changed files with 5 additions and 1 deletions
|
|
@ -556,7 +556,11 @@ class StoredTestsWithSourceFile(AbstractTestsWithSourceFile,
|
|||
|
||||
def test_add_file_after_2107(self):
|
||||
# Set atime and mtime to 2108-12-30
|
||||
os.utime(TESTFN, (4386268800, 4386268800))
|
||||
try:
|
||||
os.utime(TESTFN, (4386268800, 4386268800))
|
||||
except OverflowError:
|
||||
self.skipTest('Host fs cannot set timestamp to required value.')
|
||||
|
||||
with zipfile.ZipFile(TESTFN2, "w") as zipfp:
|
||||
self.assertRaises(struct.error, zipfp.write, TESTFN)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue