@util.writes_bytecode_files
@without_source_date_epoch
def test_old_timestamp(self):
    zeros = b'\x00\x00\x00\x00'
    with util.create_modules('_temp') as mapping:
        py_compile.compile(mapping['_temp'])
        bytecode_path = self.util.cache_from_source(mapping['_temp'])
        with open(bytecode_path, 'r+b') as bytecode_file:
            bytecode_file.seek(8)
            bytecode_file.write(zeros)
        self.import_(mapping['_temp'], '_temp')
        source_mtime = os.path.getmtime(mapping['_temp'])
        source_timestamp = self.importlib._pack_uint32(source_mtime)
        with open(bytecode_path, 'rb') as bytecode_file:
            bytecode_file.seek(8)
            self.assertEqual(bytecode_file.read(4), source_timestamp)
@util.writes_bytecode_files
@without_source_date_epoch
def test_old_timestamp(self):
    zeros = b'\x00\x00\x00\x00'
    with util.create_modules('_temp') as mapping:
        py_compile.compile(mapping['_temp'])
        bytecode_path = self.util.cache_from_source(mapping['_temp'])
        with open(bytecode_path, 'r+b') as bytecode_file:
            bytecode_file.seek(8)
            bytecode_file.write(zeros)
        self.import_(mapping['_temp'], '_temp')
        source_mtime = os.path.getmtime(mapping['_temp'])
        source_timestamp = self.importlib._pack_uint32(source_mtime)
        with open(bytecode_path, 'rb') as bytecode_file:
            bytecode_file.seek(8)
            self.assertEqual(bytecode_file.read(4), source_timestamp)