Skip to content

Commit

Permalink
Fix test_add_subparsers_twice with Python 3.12.5
Browse files Browse the repository at this point in the history
  • Loading branch information
shadchin authored Aug 11, 2024
1 parent b569790 commit d7f7f9d
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 d7f7f9d

Please sign in to comment.