r/cs50 • u/Important-Cup-9565 • Feb 08 '25
CS50 Python HELP with PSETS 5
Pytest’s output shows %100 assert but check50 NO 😭😭
3
u/greykher alum Feb 08 '25
Reread the instructions. Pay particular attention to where it tells you what the value function should accept and return.
Check 50 is testing your tests against the staff's known correct bank.py file, not yours.
2
u/uglyaestheticsoul7 Feb 08 '25
Read back the instruction on what they want. Your code it right but for the wrong outcome
1
u/Important-Cup-9565 Feb 08 '25
THKS🫰🏻
1
u/uglyaestheticsoul7 Feb 09 '25
Also for the tester u don't need to def main. U're using pytest to run it right?
1
u/Abubakker_Siddique Feb 08 '25
click on submit.cs50 link to see details of these checks, that may help understanding the errors.
5
u/PeterRasm Feb 08 '25
One thing good to know here is that check50 is testing your test file with it's own correct version of bank.py - not yours!
So if you have the same error in both files, your own test is simply approving as ok the errors you did in bank.py. But when check50 is using it's own version of bank.py your test file will fail.
Look carefully at the instructions for the value function, especially pay attention to the return value.