Skip to content

Commit

Permalink
Merge pull request #146 from shadchin/patch-1
Browse files Browse the repository at this point in the history
Fix `test_add_subparsers_twice` with Python 3.12.5
  • Loading branch information
martinjm97 authored Aug 12, 2024
2 parents b569790 + d7f7f9d commit 5257fe8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_subparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,12 @@ def configure(self):
self.add_subparsers(help="sub-command1 help")
self.add_subparsers(help="sub-command2 help")

with self.assertRaises(SystemExit):
Args().parse_args([])
if sys.version_info >= (3, 12, 5):
with self.assertRaises(ArgumentError):
Args().parse_args([])
else:
with self.assertRaises(SystemExit):
Args().parse_args([])

def test_add_subparsers_with_add_argument(self):
class SubparserA(Tap):
Expand Down

0 comments on commit 5257fe8

Please sign in to comment.