1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
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'
|