MCPcopy Create free account
hub / github.com/RustPython/RustPython / timestamp_metadata

Method timestamp_metadata

Lib/test/test_compileall.py:77–83  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

75 file.write('x (\n')
76
77 def timestamp_metadata(self):
78 with open(self.bc_path, 'rb') as file:
79 data = file.read(12)
80 mtime = int(os.stat(self.source_path).st_mtime)
81 compare = struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, 0,
82 mtime & 0xFFFF_FFFF)
83 return data, compare
84
85 def test_year_2038_mtime_compilation(self):
86 # Test to make sure we can handle mtimes larger than what a 32-bit

Callers 1

recreation_checkMethod · 0.95

Calls 4

openFunction · 0.50
readMethod · 0.45
statMethod · 0.45
packMethod · 0.45

Tested by

no test coverage detected