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

Method _check_import_error

Lib/test/test_runpy.py:655–657  ·  view source on GitHub ↗
(self, script_name, msg)

Source from the content-addressed store, hash-verified

653 self.check_code_execution(create_ns, expected_ns)
654
655 def _check_import_error(self, script_name, msg):
656 msg = re.escape(msg)
657 self.assertRaisesRegex(ImportError, msg, run_path, script_name)
658
659 def test_basic_script(self):
660 with temp_dir() as script_dir:

Callers 2

test_directory_errorMethod · 0.95
test_zipfile_errorMethod · 0.95

Calls 2

escapeMethod · 0.80
assertRaisesRegexMethod · 0.80

Tested by

no test coverage detected