11# These tests are auto-generated with test data from:
22# https://github.com/exercism/problem-specifications/tree/main/exercises/swift-scheduling/canonical-data.json
3- # File last updated on 2025-03-02
3+ # File last updated on 2025-03-03
44
55import unittest
66
@@ -15,14 +15,25 @@ def test_now_translates_to_two_hours_later(self):
1515 delivery_date ("2012-02-13T09:00:00" , "NOW" ), "2012-02-13T11:00:00"
1616 )
1717
18- def test_asap_before_noon_translates_to_today_at_five_in_the_afternoon (self ):
18+ def test_asap_before_one_in_the_afternoon_translates_to_today_at_five_in_the_afternoon (
19+ self ,
20+ ):
1921 self .assertEqual (
2022 delivery_date ("1999-06-03T09:45:00" , "ASAP" ), "1999-06-03T17:00:00"
2123 )
2224
23- def test_asap_after_noon_translates_to_tomorrow_at_noon (self ):
25+ def test_asap_at_one_in_the_afternoon_translates_to_tomorrow_at_one_in_the_afternoon (
26+ self ,
27+ ):
28+ self .assertEqual (
29+ delivery_date ("2008-12-21T13:00:00" , "ASAP" ), "2008-12-22T13:00:00"
30+ )
31+
32+ def test_asap_after_one_in_the_afternoon_translates_to_tomorrow_at_one_in_the_afternoon (
33+ self ,
34+ ):
2435 self .assertEqual (
25- delivery_date ("2008-12-21T13:30 :00" , "ASAP" ), "2008-12-22T12 :00:00"
36+ delivery_date ("2008-12-21T14:50 :00" , "ASAP" ), "2008-12-22T13 :00:00"
2637 )
2738
2839 def test_eow_on_monday_translates_to_friday_at_five_in_the_afternoon (self ):
@@ -47,7 +58,12 @@ def test_eow_on_thursday_translates_to_sunday_at_eight_in_the_evening(self):
4758
4859 def test_eow_on_friday_translates_to_sunday_at_eight_in_the_evening (self ):
4960 self .assertEqual (
50- delivery_date ("2022-08-05T12:00:00" , "EOW" ), "2022-08-07T20:00:00"
61+ delivery_date ("2022-08-05T14:00:00" , "EOW" ), "2022-08-07T20:00:00"
62+ )
63+
64+ def test_eow_translates_to_leap_day (self ):
65+ self .assertEqual (
66+ delivery_date ("2008-02-25T10:30:00" , "EOW" ), "2008-02-29T17:00:00"
5167 )
5268
5369 def test_2_m_before_the_second_month_of_this_year_translates_to_the_first_workday_of_the_second_month_of_this_year (
0 commit comments