Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 026e185

Browse files
committed
random.randint 2nd arg is inclusive, thanks Jeff Kuo!
1 parent 0e73a0d commit 026e185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

11_bottles_of_beer/test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def test_usage():
3232
def test_bad_int():
3333
"""Bad integer value"""
3434

35-
bad = random.randint(-10, 1)
35+
bad = random.randint(-10, 0)
3636
rv, out = getstatusoutput(f'{prg} -n {bad}')
3737
assert rv != 0
3838
assert re.search(f'--num "{bad}" must be greater than 0', out)

0 commit comments

Comments
 (0)