We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 21bb833 commit 29fb393Copy full SHA for 29fb393
11_bottles_of_beer/test.py
@@ -31,9 +31,10 @@ def test_usage():
31
def test_bad_int():
32
"""Bad integer value"""
33
34
- rv, out = getstatusoutput(f'{prg} -n -1')
+ bad = random.randint(-10, -1)
35
+ rv, out = getstatusoutput(f'{prg} -n {bad}')
36
assert rv != 0
- assert re.search(r'--num \(-1\) must > 0', out)
37
+ assert re.search(f'--num "{bad}" must be greater than 0', out)
38
39
40
# --------------------------------------------------
0 commit comments