You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/argh/files/argh-0.26.2-fix-py3.9-msgs....

32 lines
1.1 KiB

diff --git a/test/test_integration.py b/test/test_integration.py
index 8899d8e..589f6d6 100644
--- a/test/test_integration.py
+++ b/test/test_integration.py
@@ -377,7 +377,7 @@ def test_invalid_choice():
p = DebugArghParser()
p.add_commands([cmd])
- assert run(p, 'bar', exit=True).startswith('invalid choice')
+ assert 'invalid choice' in run(p, 'bar', exit=True)
if sys.version_info < (3,3):
# Python before 3.3 exits with a less informative error
@@ -391,7 +391,7 @@ def test_invalid_choice():
p = DebugArghParser()
p.add_commands([cmd], namespace='nest')
- assert run(p, 'nest bar', exit=True).startswith('invalid choice')
+ assert 'invalid choice' in run(p, 'nest bar', exit=True)
if sys.version_info < (3,3):
# Python before 3.3 exits with a less informative error
@@ -511,7 +511,7 @@ def test_explicit_cmd_name():
p = DebugArghParser()
p.add_commands([orig_name])
- assert run(p, 'orig-name', exit=True).startswith('invalid choice')
+ assert 'invalid choice' in run(p, 'orig-name', exit=True)
assert run(p, 'new-name').out == 'ok\n'