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

Method check_usage

Lib/test/test_argparse.py:7208–7211  ·  view source on GitHub ↗
(self, expected, *args, **kwargs)

Source from the content-addressed store, hash-verified

7206 return zip_name
7207
7208 def check_usage(self, expected, *args, **kwargs):
7209 res = script_helper.assert_python_ok('-Xutf8', *args, '-h', **kwargs)
7210 self.assertEqual(os.fsdecode(res.out.splitlines()[0]),
7211 f'usage: {expected} [-h]')
7212
7213 def test_script(self, compiled=False):
7214 basename = os_helper.TESTFN

Callers 6

test_scriptMethod · 0.95
test_directoryMethod · 0.95
test_moduleMethod · 0.95
test_packageMethod · 0.95
test_zipfileMethod · 0.95

Calls 3

assert_python_okMethod · 0.80
assertEqualMethod · 0.45
splitlinesMethod · 0.45

Tested by

no test coverage detected