Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

PSET 5 Test plates : getting exit code 0 instead of 1

test_plates: from plates import is_valid def test_correct(): assert (is_valid("ASD123")) == True assert (is_valid("ASD")) == True assert (is_valid("AS2")) == ...
Athi's user avatar
  • 33
0 votes
1 answer
79 views

"test_fuel catches fuel.py not printing % in gauge expected exit code 1, not 0"

I have passed all of the other check50 requirements except for this one. Here is my code def main(): while True: try: number = input("Fraction: ") if &...
Bryan Tamrin's user avatar
0 votes
1 answer
203 views

Refueling - problem set 5 - CS50

I have a problem with refueling from problem set 5 of cs50p. I tried and implement a lot of version of the code, always good enough to do the job and pass the test but check50 fails. I give fuel.py ...
domionico's user avatar
1 vote
1 answer
2k views

check50 error expected exit code 0, not 1

I was following python programming course and with the unit test chapter I updated the main file and the test files as described in this problem set page. Now I'm sure that my tests are running fine ...
Tuhin's user avatar
  • 13
1 vote
3 answers
6k views

I hope CS50 community can help why I got expected exit code 0, not 1

If I "return None" explicitly for exceptions in a regular .py file, when I do the test.py file, is it correct to test with a "assert function(argument) is None?" I did a pytest and ...
TimL's user avatar
  • 11
1 vote
1 answer
6k views

PS5 - Back to the Bank - check50 - expected exit code 0, not 1

For PS5 - Back to the Bank, the unit test script works when I run it on code50, however, when I run the check50 I am getting expected exit code 0, not 1. If anyone has a suggestion, I would greatly ...
Jean-Marc's user avatar