File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -1788,7 +1788,8 @@ def test_write_with_source_date_epoch(self):
1788
1788
1789
1789
with zipfile .ZipFile (TESTFN , "r" ) as zf :
1790
1790
zip_info = zf .getinfo ("test_source_date_epoch.txt" )
1791
- self .assertEqual (zip_info .date_time , time .gmtime (int (os .environ ['SOURCE_DATE_EPOCH' ]))[:6 ])
1791
+ get_time = time .gmtime (int (os .environ ['SOURCE_DATE_EPOCH' ]))[:6 ]
1792
+ self .assertAlmostEqual (zip_info .date_time , get_time , delta = 1 )
1792
1793
1793
1794
def test_write_without_source_date_epoch (self ):
1794
1795
if 'SOURCE_DATE_EPOCH' in os .environ :
@@ -1799,7 +1800,7 @@ def test_write_without_source_date_epoch(self):
1799
1800
1800
1801
with zipfile .ZipFile (TESTFN , "r" ) as zf :
1801
1802
zip_info = zf .getinfo ("test_no_source_date_epoch.txt" )
1802
- self .assertNotEqual (zip_info .date_time , time .gmtime ()[:6 ])
1803
+ self .assertEqual (zip_info .date_time , time .gmtime ()[:6 ])
1803
1804
1804
1805
def test_close (self ):
1805
1806
"""Check that the zipfile is closed after the 'with' block."""
You can’t perform that action at this time.
0 commit comments