Skip to content

Commit f7c52b8

Browse files
committed
Materialize the expected value for the timestamp.
1 parent 6fda35b commit f7c52b8

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

Lib/test/test_zipfile/test_core.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1812,11 +1812,8 @@ def test_write_with_source_date_epoch(self):
18121812

18131813
with zipfile.ZipFile(TESTFN, "r") as zf:
18141814
zip_info = zf.getinfo("test_source_date_epoch.txt")
1815-
get_time = time.gmtime(int(os.environ['SOURCE_DATE_EPOCH']))[:6]
1816-
# Compare each element of the date_time tuple
1817-
# Allow for a 1-second difference
1818-
for z_time, g_time in zip(zip_info.date_time, get_time):
1819-
self.assertAlmostEqual(z_time, g_time, delta=1)
1815+
expected_utc = (1975, 7, 2, 22, 19, 59)
1816+
self.assertEqual(zip_info.date_time, expected_utc)
18201817

18211818
def test_write_without_source_date_epoch(self):
18221819
with os_helper.EnvironmentVarGuard() as env:

0 commit comments

Comments
 (0)