MCPcopy Index your code
hub / github.com/python/cpython / timestamp_metadata

Method timestamp_metadata

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

Source from the content-addressed store, hash-verified

79 file.write('x (\n')
80
81 def timestamp_metadata(self):
82 with open(self.bc_path, 'rb') as file:
83 data = file.read(12)
84 mtime = int(os.stat(self.source_path).st_mtime)
85 compare = struct.pack('<4sLL', importlib.util.MAGIC_NUMBER, 0,
86 mtime & 0xFFFF_FFFF)
87 return data, compare
88
89 def test_year_2038_mtime_compilation(self):
90 # 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