check50

cs50/problems/2022/python/working


:) working.py and test_working.py exist

Log
checking that working.py exists...
checking that test_working.py exists...

:) working.py does not import libraries other than sys and re

:) working.py converts "9 AM to 5 PM" to "09:00 to 17:00"

Log
running python3 working.py...
sending input 9 AM to 5 PM...
checking for output "09:00 to 17:00"...
checking that program exited with status 0...

:) working.py converts "9:00 AM to 5:00 PM" to "09:00 to 17:00"

Log
running python3 working.py...
sending input 9:00 AM to 5:00 PM...
checking for output "09:00 to 17:00"...
checking that program exited with status 0...

:) working.py converts "8 PM to 8 AM" to "20:00 to 08:00"

Log
running python3 working.py...
sending input 8 PM to 8 AM...
checking for output "20:00 to 08:00"...
checking that program exited with status 0...

:) working.py converts "8:00 PM to 8:00 AM" to "20:00 to 08:00"

Log
running python3 working.py...
sending input 8:00 PM to 8:00 AM...
checking for output "20:00 to 08:00"...
checking that program exited with status 0...

:) working.py converts "12 AM to 12 PM" to "00:00 to 12:00"

Log
running python3 working.py...
sending input 12 AM to 12 PM...
checking for output "00:00 to 12:00"...
checking that program exited with status 0...

:) working.py converts "12:00 AM to 12:00 PM" to "00:00 to 12:00"

Log
running python3 working.py...
sending input 12:00 AM to 12:00 PM...
checking for output "00:00 to 12:00"...
checking that program exited with status 0...

:) working.py raises ValueError when given "8:60 AM to 4:60 PM"

Log
running python3 working.py...
sending input 8:60 AM to 4:60 PM...
checking for output "ValueError"...
checking that program exited with status 1...

:) working.py raises ValueError when given "9AM to 5PM"

Log
running python3 working.py...
sending input 9AM to 5PM...
checking for output "ValueError"...
checking that program exited with status 1...

:) working.py raises ValueError when given "09:00 to 17:00"

Log
running python3 working.py...
sending input 09:00 to 17:00...
checking for output "ValueError"...
checking that program exited with status 1...

:) working.py raises ValueError when given "9 AM - 5 PM"

Log
running python3 working.py...
sending input 9 AM - 5 PM...
checking for output "ValueError"...
checking that program exited with status 1...

:) working.py raises ValueError when given "10:7 AM - 5:1 PM"

Log
running python3 working.py...
sending input 10:7 AM - 5:1 PM...
checking for output "ValueError"...
checking that program exited with status 1...

:) correct working.py passes all test_working checks

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

:) test_working.py catches working.py printing incorrect hours

Log
running pytest test_working.py...
checking that program exited with status 1...

:) test_working.py catches working.py printing incorrect minutes

Log
running pytest test_working.py...
checking that program exited with status 1...

:) test_working.py catches working.py not raising ValueError when user omits " to "

Log
running pytest test_working.py...
checking that program exited with status 1...

:) test_working.py catches working.py not raising ValueError for out-of-range times

Log
running pytest test_working.py...
checking that program exited with status 1...

:( test_working.py catches working.py not raising ValueError for invalid time format

Cause
expected exit code 1, not 0

Log
running pytest test_working.py...
checking that program exited with status 1...