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

Method test_zipfile_error

Lib/test/test_runpy.py:736–742  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

734 mod_name=mod_name, check_loader=False)
735
736 def test_zipfile_error(self):
737 with temp_dir() as script_dir:
738 mod_name = 'not_main'
739 script_name = self._make_test_script(script_dir, mod_name)
740 zip_name, fname = make_zip_script(script_dir, 'test_zip', script_name)
741 msg = "can't find '__main__' module in %r" % zip_name
742 self._check_import_error(zip_name, msg)
743
744 @no_tracing
745 @requires_resource('cpu')

Callers

nothing calls this directly

Calls 4

_make_test_scriptMethod · 0.95
_check_import_errorMethod · 0.95
temp_dirFunction · 0.90
make_zip_scriptFunction · 0.90

Tested by

no test coverage detected