diff options
author | Victor Stinner <vstinner@python.org> | 2020-01-30 14:47:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-01-30 14:47:53 (GMT) |
commit | c232c9110cfefa0935cbf158e35e91746a8a9361 (patch) | |
tree | d341af64e2e5ac1a9b6f8f119bd3b8e91a325e90 /Lib/test/test_zipfile.py | |
parent | 8d49f7ceb4f961770ae61fe6a4033c4e61cc3288 (diff) | |
download | cpython-c232c9110cfefa0935cbf158e35e91746a8a9361.zip cpython-c232c9110cfefa0935cbf158e35e91746a8a9361.tar.gz cpython-c232c9110cfefa0935cbf158e35e91746a8a9361.tar.bz2 |
bpo-39502: Skip test_zipfile.test_add_file_after_2107() on AIX (GH-18282)
Skip test_zipfile.test_add_file_after_2107() if time.localtime()
fails with OverflowError. It is the case on AIX 6.1 for example.
Diffstat (limited to 'Lib/test/test_zipfile.py')
-rw-r--r-- | Lib/test/test_zipfile.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 4c20bfd..c334715 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -611,8 +611,13 @@ class StoredTestsWithSourceFile(AbstractTestsWithSourceFile, def test_add_file_after_2107(self): # Set atime and mtime to 2108-12-30 + ts = 4386268800 try: - os.utime(TESTFN, (4386268800, 4386268800)) + time.localtime(ts) + except OverflowError: + self.skipTest(f'time.localtime({ts}) raises OverflowError') + try: + os.utime(TESTFN, (ts, ts)) except OverflowError: self.skipTest('Host fs cannot set timestamp to required value.') |