Skip to content

Commit 3753a0d

Browse files
committed
test case fixation assertIn
1 parent ade070f commit 3753a0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Lib/test/test_argparse.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2193,9 +2193,9 @@ def test_wrong_argument_subparsers_no_destination_error(self):
21932193
subparsers.add_parser('bar')
21942194
with self.assertRaises(ArgumentParserError) as excinfo:
21952195
parser.parse_args(('baz',))
2196-
self.assertRegex(
2196+
self.assertIn(
2197+
"error: argument {foo,bar}: invalid choice: 'baz', maybe you meant 'bar'? (choose from 'foo', 'bar')",
21972198
excinfo.exception.stderr,
2198-
r"error: argument {foo,bar}: invalid choice: 'baz', maybe you meant 'bar'? \(choose from 'foo', 'bar'\)\n$",
21992199
)
22002200

22012201
def test_optional_subparsers(self):

0 commit comments

Comments
 (0)