(self)
| 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: |
| 371 | pkg_dir = os.path.join(script_dir, 'test_pkg') |
| 372 | make_pkg(pkg_dir) |
| 373 | main_dir = os.path.join(pkg_dir, '__main__') |
| 374 | make_pkg(main_dir) |
| 375 | msg = ("Cannot use package as __main__ module; " |
| 376 | "'test_pkg' is a package and cannot " |
| 377 | "be directly executed") |
| 378 | self._check_import_error(["-m", "test_pkg"], msg, cwd=script_dir) |
| 379 | |
| 380 | def test_issue8202(self): |
| 381 | # Make sure package __init__ modules see "-m" in sys.argv0 while |
nothing calls this directly
no test coverage detected