Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
ef8e4fc
Add closet choice if exists in argparser if wrong choice picked
abdulrafey38 Nov 25, 2022
7e8dcf8
📜🤖 Added by blurb_it.
blurb-it[bot] Nov 25, 2022
8c754cd
Fix documentation
abdulrafey38 Nov 25, 2022
4fb8ce6
Added EOL :hammer:
abdulrafey38 Nov 25, 2022
2f197b3
Test cases updated for argparser
abdulrafey38 Nov 25, 2022
940a66e
Fixed typo errors :hammer:
abdulrafey38 Nov 25, 2022
badc5ed
Test case fix :hammer:
abdulrafey38 Nov 25, 2022
2588ef1
Fixed test cse error msg :hammer:
abdulrafey38 Nov 25, 2022
ee05c1e
Fixed error test case assert msg :hammer:
abdulrafey38 Nov 25, 2022
4a36406
assertion fix :hammer:
abdulrafey38 Nov 25, 2022
fe169bc
assertion test case fix
abdulrafey38 Nov 25, 2022
9fe0d95
Test Case fix
abdulrafey38 Nov 25, 2022
d12e1c4
Reveet to assertRegex from assertEqual
abdulrafey38 Nov 25, 2022
35f0961
Remove unused imports :hammer:
abdulrafey38 Nov 25, 2022
087895c
assertion msg fixed :hammer:
abdulrafey38 Nov 25, 2022
6eeae5c
test cases fixed :hammer:
abdulrafey38 Nov 25, 2022
9965694
assert fix
abdulrafey38 Nov 25, 2022
4ef218a
assertion fix
abdulrafey38 Nov 25, 2022
e63a01c
revert testing
abdulrafey38 Nov 25, 2022
bfc9262
test: hammer:
abdulrafey38 Nov 25, 2022
b3b4a9e
fixed
abdulrafey38 Nov 25, 2022
b8bc465
PR review changes :hammer:
abdulrafey38 Nov 26, 2022
ade070f
test case fix :hammer:
abdulrafey38 Nov 26, 2022
3753a0d
test case fixation assertIn
abdulrafey38 Nov 26, 2022
2b802ec
Merge branch 'main' into gh-99773
savannahostrowski Sep 24, 2024
f516bb4
Rework to add tests and make optional
savannahostrowski Sep 24, 2024
c9b40f5
Add to docs
savannahostrowski Sep 24, 2024
981bacd
Add implicit test case
savannahostrowski Sep 24, 2024
f9a6cc1
Appease linter
savannahostrowski Sep 24, 2024
6bdb131
📜🤖 Added by blurb_it.
blurb-it[bot] Sep 24, 2024
2c39866
Merge branch 'main' into gh-99773
savannahostrowski Sep 24, 2024
fb3769c
Undo import rename
savannahostrowski Sep 24, 2024
0eeb543
update docs
savannahostrowski Sep 24, 2024
972cc1e
update spacing
savannahostrowski Sep 24, 2024
22cdcf2
restore newline
savannahostrowski Sep 24, 2024
257c030
add section on suggest_on_error
savannahostrowski Sep 24, 2024
f97de33
fix indent
savannahostrowski Sep 24, 2024
fb5f041
Merge branch 'main' into gh-99773
savannahostrowski Sep 24, 2024
a55483e
Address PR comments
savannahostrowski Sep 26, 2024
1df84e4
add guard for types
savannahostrowski Sep 26, 2024
b5cb94b
remove comment
savannahostrowski Sep 26, 2024
4179a6f
Linting
savannahostrowski Sep 26, 2024
8e4793c
add pr comment
savannahostrowski Sep 26, 2024
b782fbc
merge main
savannahostrowski Oct 11, 2024
73c4bd3
fix merge conflict
savannahostrowski Oct 12, 2024
d2c665d
Merge branch 'main' into gh-99773
savannahostrowski Oct 12, 2024
d1daff1
Appease linter
savannahostrowski Oct 12, 2024
f57b4dc
Merge branch 'gh-99773' of https://github.com/savannahostrowski/cpyth…
savannahostrowski Oct 12, 2024
f2f67e7
Merge branch 'main' into gh-99773
serhiy-storchaka Oct 14, 2024
3d9bbb4
Update Misc/NEWS.d/next/Library/2024-09-24-18-49-16.gh-issue-99749.gB…
savannahostrowski Oct 17, 2024
c494469
Merge branch 'main' into gh-99773
savannahostrowski Oct 17, 2024
05dc55c
Test whole line
savannahostrowski Oct 17, 2024
68b9383
Merge branch 'gh-99773' of https://github.com/savannahostrowski/cpyth…
savannahostrowski Oct 17, 2024
f2781cc
Fix line length
savannahostrowski Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
assertion test case fix
  • Loading branch information
abdulrafey38 committed Nov 25, 2022
commit fe169bc396481ac318d40b2d95fa0e7b4108e577
7 changes: 4 additions & 3 deletions Lib/test/test_argparse.py
Original file line number Diff line number Diff line change
Expand Up @@ -2194,10 +2194,11 @@ def test_wrong_argument_subparsers_no_destination_error(self):
subparsers.add_parser('bar')
with self.assertRaises(ArgumentParserError) as excinfo:
parser.parse_args(('baz',))
self.assertRegex(
self.assertEqual(
excinfo.exception.stderr,
r"error: argument {foo,bar}: invalid choice: 'baz', maybe you meant"
" 'bar'? (choose from 'foo', 'bar')"
"usage: __main__.py [-h] {foo,bar} ...\n__main__.py: error:"
"argument {foo,bar}: invalid choice: 'baz', maybe you meant"
" 'bar'? (choose from 'foo', 'bar')\n"
)

def test_optional_subparsers(self):
Expand Down