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

Method assert_bad_help

Lib/test/test_argparse.py:2930–2933  ·  view source on GitHub ↗
(self, context_type, func, *args, **kwargs)

Source from the content-addressed store, hash-verified

2928 '''))
2929
2930 def assert_bad_help(self, context_type, func, *args, **kwargs):
2931 with self.assertRaisesRegex(ValueError, 'badly formed help string') as cm:
2932 func(*args, **kwargs)
2933 self.assertIsInstance(cm.exception.__context__, context_type)
2934
2935 def test_invalid_subparsers_help(self):
2936 parser = ErrorRaisingArgumentParser(prog='PROG')

Callers 2

Calls 3

assertRaisesRegexMethod · 0.80
assertIsInstanceMethod · 0.80
funcFunction · 0.70

Tested by

no test coverage detected