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

Method testBytesPath

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

Source from the content-addressed store, hash-verified

867 spec.loader.exec_module(mod)
868
869 def testBytesPath(self):
870 filename = os_helper.TESTFN + ".zip"
871 self.makeZip({TESTMOD + ".py": test_src}, filename)
872
873 zipimport.zipimporter(filename)
874 with self.assertRaises(TypeError):
875 zipimport.zipimporter(os.fsencode(filename))
876 with self.assertRaises(TypeError):
877 zipimport.zipimporter(bytearray(os.fsencode(filename)))
878 with self.assertRaises(TypeError):
879 zipimport.zipimporter(memoryview(os.fsencode(filename)))
880
881 def testComment(self):
882 files = {TESTMOD + ".py": test_src}

Callers

nothing calls this directly

Calls 2

makeZipMethod · 0.95
assertRaisesMethod · 0.45

Tested by

no test coverage detected