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

Method testBadMTime

Lib/test/test_zipimport.py:294–301  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

292 self.assertIn("magic number", exc.__cause__.msg)
293
294 def testBadMTime(self):
295 badtime_pyc = bytearray(test_pyc)
296 # flip the second bit -- not the first as that one isn't stored in the
297 # .py's mtime in the zip archive.
298 badtime_pyc[11] ^= 0x02
299 files = {TESTMOD + ".py": test_src,
300 TESTMOD + pyc_ext: badtime_pyc}
301 self.doTest(".py", files, TESTMOD)
302
303 def test2038MTime(self):
304 # Make sure we can handle mtimes larger than what a 32-bit signed number

Callers

nothing calls this directly

Calls 1

doTestMethod · 0.95

Tested by

no test coverage detected