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

Method test_package

Lib/test/test_argparse.py:7242–7251  ·  view source on GitHub ↗
(self, compiled=False)

Source from the content-addressed store, hash-verified

7240 self.test_module(compiled=True)
7241
7242 def test_package(self, compiled=False):
7243 basename = 'subpackage' + os_helper.FS_NONASCII
7244 packagename = f'{self.dirname}.{basename}'
7245 subdirname = os.path.join(self.dirname, basename)
7246 os.mkdir(subdirname)
7247 self.make_script(subdirname, '__main__', compiled=compiled)
7248 self.check_usage(f'{py} -m {packagename}',
7249 '-m', packagename, PYTHONPATH=os.curdir)
7250 self.check_usage(f'{py} -m {packagename}',
7251 '-m', packagename + '.__main__', PYTHONPATH=os.curdir)
7252
7253 def test_package_compiled(self):
7254 self.test_package(compiled=True)

Callers 1

test_package_compiledMethod · 0.95

Calls 4

make_scriptMethod · 0.95
check_usageMethod · 0.95
joinMethod · 0.45
mkdirMethod · 0.45

Tested by

no test coverage detected