We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e8c1c94 commit 9faaac7Copy full SHA for 9faaac7
Lib/test/test_argparse.py
@@ -797,10 +797,8 @@ def test_invalid_name(self):
797
798
def test_prefix_chars_incompatibility(self):
799
parser = argparse.ArgumentParser(prefix_chars='+')
800
- with self.assertRaisesRegex(ValueError, ...) as cm:
+ with self.assertRaisesRegex(ValueError, "BooleanOptionalAction requires '-' in prefix_chars."):
801
parser.add_argument('++foo', action=argparse.BooleanOptionalAction)
802
- self.assertEqual(str(cm.exception),
803
- "BooleanOptionalAction requires '-' in prefix_chars.")
804
805
class TestBooleanOptionalActionRequired(ParserTestCase):
806
"""Tests BooleanOptionalAction required"""
0 commit comments