check50

cs50/problems/2022/python/jar


:) jar.py exists

Log
checking that jar.py exists...
checking that test_jar.py exists...

:( Jar's constructor initializes a cookie jar with given capacity

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_init'...
checking that program exited with status 0...

:( Jar's constructor raises ValueError when called with negative capacity

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_raises_value_error'...
checking that program exited with status 0...

:( Empty jar prints zero cookies

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_empty_str'...
checking that program exited with status 0...

:( Jar prints total number of cookies deposited

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_full_str'...
checking that program exited with status 0...

:( Jar's deposit method raises ValueError when deposited cookies exceed the jar's capacity

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_too_full'...
checking that program exited with status 0...

:( Jar's withdraw method removes cookies from the jar's size

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_withdraw'...
checking that program exited with status 0...

:( Jar's withdraw method raises ValueError when withdrawn cookies exceed jar's size

Cause
expected exit code 0, not 1

Log
running pytest test_file.py -k 'test_empty'...
checking that program exited with status 0...

:) Implementation of Jar passes all tests in test_jar.py

Log
running pytest test_jar.py...
checking that program exited with status 0...

:) test_jar.py contains at least four functions

Log
running pytest test_jar.py...