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

Method test_package_error

Lib/test/test_cmd_line_script.py:361–367  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

359 cwd=script_dir)
360
361 def test_package_error(self):
362 with os_helper.temp_dir() as script_dir:
363 pkg_dir = os.path.join(script_dir, 'test_pkg')
364 make_pkg(pkg_dir)
365 msg = ("'test_pkg' is a package and cannot "
366 "be directly executed")
367 self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir)
368
369 def test_package_recursion(self):
370 with os_helper.temp_dir() as script_dir:

Callers

nothing calls this directly

Calls 4

_check_import_errorMethod · 0.95
make_pkgFunction · 0.90
temp_dirMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected