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

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

:) game.py rejects non-positive guess

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

:) game.py rejects guess above specified range with "Too large!"

Log
running python3 testing.py...
sending input 4...
sending input 8...
checking for output "Too large!"...
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

Cause
Did not find "Just right!" in "Too small!\r\n..."

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

Could not find the following in the output:
Just right!
Actual Output:
Too small!
Guess: 

:) 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...