MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_package

Method test_package

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

Source from the content-addressed store, hash-verified

7108 self.test_module(compiled=True)
7109
7110 def test_package(self, compiled=False):
7111 basename = 'subpackage' + os_helper.FS_NONASCII
7112 packagename = f'{self.dirname}.{basename}'
7113 subdirname = os.path.join(self.dirname, basename)
7114 os.mkdir(subdirname)
7115 self.make_script(subdirname, '__main__', compiled=compiled)
7116 self.check_usage(f'{py} -m {packagename}',
7117 '-m', packagename, PYTHONPATH=os.curdir)
7118 self.check_usage(f'{py} -m {packagename}',
7119 '-m', packagename + '.__main__', PYTHONPATH=os.curdir)
7120
7121 def test_package_compiled(self):
7122 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