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

Method test_group_prefix_chars

Lib/test/test_argparse.py:3095–3104  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3093
3094class TestGroupConstructor(TestCase):
3095 def test_group_prefix_chars(self):
3096 parser = ErrorRaisingArgumentParser()
3097 msg = (
3098 "The use of the undocumented 'prefix_chars' parameter in "
3099 "ArgumentParser.add_argument_group() is deprecated."
3100 )
3101 with self.assertWarns(DeprecationWarning) as cm:
3102 parser.add_argument_group(prefix_chars='-+')
3103 self.assertEqual(msg, str(cm.warning))
3104 self.assertEqual(cm.filename, __file__)
3105
3106 def test_group_prefix_chars_default(self):
3107 # "default" isn't quite the right word here, but it's the same as

Callers

nothing calls this directly

Calls 5

strFunction · 0.85
assertWarnsMethod · 0.80
add_argument_groupMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected