check50

cs50/problems/2022/python/game


:) game.py exists

Log
checking that game.py exists...

:) game.py rejects non-numeric level

Log
running python3 game.py...
sending input cat...
checking that input was rejected...

:) game.py rejects out-of-range level

Log
running python3 game.py...
sending input 0...
checking that input was rejected...

:) game.py accepts valid level

Log
running python3 game.py...
sending input 10...
checking for output "Guess:"...

:( game.py rejects non-numeric guess

Cause
expected program to reject input, but it did not

Log
running python3 game.py...
sending input 1...
sending input cat...
checking that input was rejected...

:( game.py rejects out-of-range guess

Cause
expected program to reject input, but it did not

Log
running python3 game.py...
sending input 1...
sending input 0...
checking that input was rejected...

:) game.py outputs "Too large!" when guess is too large

Log
running python3 testing.py...
sending input 22...
sending input 18...
checking for output "Too large!"...
checking that input was rejected...

:) game.py outputs "Just right!" when guess is correct

Log
running python3 testing.py...
sending input 6...
sending input 4...
checking for output "Just right!"...

:) game.py outputs "Too small!" when guess is too small

Log
running python3 testing.py...
sending input 5...
sending input 2...
checking for output "Too small!"...
checking that input was rejected...