Skip to content

Commit dcb2665

Browse files
committed
Update missed test
1 parent 0a6f96c commit dcb2665

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_importlib/source/test_file_loader.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ def test_bad_marshal(self):
635635
def test_old_timestamp(self):
636636
# When the timestamp is older than the source, bytecode should be
637637
# regenerated.
638-
zeros = b'\x00\x00\x00\x00'
638+
zeros = b'\x00\x00\x00\x00\x00\x00\x00\x00'
639639
with util.create_modules('_temp') as mapping:
640640
py_compile.compile(mapping['_temp'])
641641
bytecode_path = self.util.cache_from_source(mapping['_temp'])
@@ -644,10 +644,10 @@ def test_old_timestamp(self):
644644
bytecode_file.write(zeros)
645645
self.import_(mapping['_temp'], '_temp')
646646
source_mtime = os.path.getmtime(mapping['_temp'])
647-
source_timestamp = self.importlib._pack_uint32(source_mtime)
647+
source_timestamp = self.importlib._pack_uint64(source_mtime)
648648
with open(bytecode_path, 'rb') as bytecode_file:
649649
bytecode_file.seek(8)
650-
self.assertEqual(bytecode_file.read(4), source_timestamp)
650+
self.assertEqual(bytecode_file.read(8), source_timestamp)
651651

652652
# [bytecode read-only]
653653
@util.writes_bytecode_files

0 commit comments

Comments
 (0)