Skip to content

Commit 0d05f55

Browse files
authored
Merge pull request #328 from cs50/CS50p-Working-Accepts-Leading-Zeros
CS50p Wk 7 Working - Test for times with leading zeros
2 parents e450e34 + f718910 commit 0d05f55

File tree

6 files changed

+6
-0
lines changed

6 files changed

+6
-0
lines changed

working/__init__.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ def raise_for_invalid_spaces():
7474
test_invalid_time(input="9AM to 5PM", error="ValueError")
7575

7676

77+
@check50.check(libraries)
78+
def raise_for_leading_zero():
79+
"""working.py raises ValueError when given \"09 AM to 5:001 PM\""""
80+
test_invalid_time(input="09 AM to 5:001 PM", error="ValueError")
81+
82+
7783
@check50.check(libraries)
7884
def raise_for_invalid_format_24_hour():
7985
"""working.py raises ValueError when given \"09:00 to 17:00\""""

working/correct_test.pyc

171 Bytes
Binary file not shown.

working/off_by_five_test.pyc

171 Bytes
Binary file not shown.

working/off_by_one_test.pyc

171 Bytes
Binary file not shown.

working/raise_for_format_test.pyc

171 Bytes
Binary file not shown.
171 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)