@@ -74,172 +74,172 @@ def test_when_teenth_sunday_is_the_13th_the_first_day_of_the_teenth_week(self):
74
74
self .assertEqual (meetup (2013 , 10 , "teenth" , "Sunday" ), date (2013 , 10 , 13 ))
75
75
76
76
def test_when_first_monday_is_some_day_in_the_middle_of_the_first_week (self ):
77
- self .assertEqual (meetup (2013 , 3 , "1st " , "Monday" ), date (2013 , 3 , 4 ))
77
+ self .assertEqual (meetup (2013 , 3 , "first " , "Monday" ), date (2013 , 3 , 4 ))
78
78
79
79
def test_when_first_monday_is_the_1st_the_first_day_of_the_first_week (self ):
80
- self .assertEqual (meetup (2013 , 4 , "1st " , "Monday" ), date (2013 , 4 , 1 ))
80
+ self .assertEqual (meetup (2013 , 4 , "first " , "Monday" ), date (2013 , 4 , 1 ))
81
81
82
82
def test_when_first_tuesday_is_the_7th_the_last_day_of_the_first_week (self ):
83
- self .assertEqual (meetup (2013 , 5 , "1st " , "Tuesday" ), date (2013 , 5 , 7 ))
83
+ self .assertEqual (meetup (2013 , 5 , "first " , "Tuesday" ), date (2013 , 5 , 7 ))
84
84
85
85
def test_when_first_tuesday_is_some_day_in_the_middle_of_the_first_week (self ):
86
- self .assertEqual (meetup (2013 , 6 , "1st " , "Tuesday" ), date (2013 , 6 , 4 ))
86
+ self .assertEqual (meetup (2013 , 6 , "first " , "Tuesday" ), date (2013 , 6 , 4 ))
87
87
88
88
def test_when_first_wednesday_is_some_day_in_the_middle_of_the_first_week (self ):
89
- self .assertEqual (meetup (2013 , 7 , "1st " , "Wednesday" ), date (2013 , 7 , 3 ))
89
+ self .assertEqual (meetup (2013 , 7 , "first " , "Wednesday" ), date (2013 , 7 , 3 ))
90
90
91
91
def test_when_first_wednesday_is_the_7th_the_last_day_of_the_first_week (self ):
92
- self .assertEqual (meetup (2013 , 8 , "1st " , "Wednesday" ), date (2013 , 8 , 7 ))
92
+ self .assertEqual (meetup (2013 , 8 , "first " , "Wednesday" ), date (2013 , 8 , 7 ))
93
93
94
94
def test_when_first_thursday_is_some_day_in_the_middle_of_the_first_week (self ):
95
- self .assertEqual (meetup (2013 , 9 , "1st " , "Thursday" ), date (2013 , 9 , 5 ))
95
+ self .assertEqual (meetup (2013 , 9 , "first " , "Thursday" ), date (2013 , 9 , 5 ))
96
96
97
97
def test_when_first_thursday_is_another_day_in_the_middle_of_the_first_week (self ):
98
- self .assertEqual (meetup (2013 , 10 , "1st " , "Thursday" ), date (2013 , 10 , 3 ))
98
+ self .assertEqual (meetup (2013 , 10 , "first " , "Thursday" ), date (2013 , 10 , 3 ))
99
99
100
100
def test_when_first_friday_is_the_1st_the_first_day_of_the_first_week (self ):
101
- self .assertEqual (meetup (2013 , 11 , "1st " , "Friday" ), date (2013 , 11 , 1 ))
101
+ self .assertEqual (meetup (2013 , 11 , "first " , "Friday" ), date (2013 , 11 , 1 ))
102
102
103
103
def test_when_first_friday_is_some_day_in_the_middle_of_the_first_week (self ):
104
- self .assertEqual (meetup (2013 , 12 , "1st " , "Friday" ), date (2013 , 12 , 6 ))
104
+ self .assertEqual (meetup (2013 , 12 , "first " , "Friday" ), date (2013 , 12 , 6 ))
105
105
106
106
def test_when_first_saturday_is_some_day_in_the_middle_of_the_first_week (self ):
107
- self .assertEqual (meetup (2013 , 1 , "1st " , "Saturday" ), date (2013 , 1 , 5 ))
107
+ self .assertEqual (meetup (2013 , 1 , "first " , "Saturday" ), date (2013 , 1 , 5 ))
108
108
109
109
def test_when_first_saturday_is_another_day_in_the_middle_of_the_first_week (self ):
110
- self .assertEqual (meetup (2013 , 2 , "1st " , "Saturday" ), date (2013 , 2 , 2 ))
110
+ self .assertEqual (meetup (2013 , 2 , "first " , "Saturday" ), date (2013 , 2 , 2 ))
111
111
112
112
def test_when_first_sunday_is_some_day_in_the_middle_of_the_first_week (self ):
113
- self .assertEqual (meetup (2013 , 3 , "1st " , "Sunday" ), date (2013 , 3 , 3 ))
113
+ self .assertEqual (meetup (2013 , 3 , "first " , "Sunday" ), date (2013 , 3 , 3 ))
114
114
115
115
def test_when_first_sunday_is_the_7th_the_last_day_of_the_first_week (self ):
116
- self .assertEqual (meetup (2013 , 4 , "1st " , "Sunday" ), date (2013 , 4 , 7 ))
116
+ self .assertEqual (meetup (2013 , 4 , "first " , "Sunday" ), date (2013 , 4 , 7 ))
117
117
118
118
def test_when_second_monday_is_some_day_in_the_middle_of_the_second_week (self ):
119
- self .assertEqual (meetup (2013 , 3 , "2nd " , "Monday" ), date (2013 , 3 , 11 ))
119
+ self .assertEqual (meetup (2013 , 3 , "second " , "Monday" ), date (2013 , 3 , 11 ))
120
120
121
121
def test_when_second_monday_is_the_8th_the_first_day_of_the_second_week (self ):
122
- self .assertEqual (meetup (2013 , 4 , "2nd " , "Monday" ), date (2013 , 4 , 8 ))
122
+ self .assertEqual (meetup (2013 , 4 , "second " , "Monday" ), date (2013 , 4 , 8 ))
123
123
124
124
def test_when_second_tuesday_is_the_14th_the_last_day_of_the_second_week (self ):
125
- self .assertEqual (meetup (2013 , 5 , "2nd " , "Tuesday" ), date (2013 , 5 , 14 ))
125
+ self .assertEqual (meetup (2013 , 5 , "second " , "Tuesday" ), date (2013 , 5 , 14 ))
126
126
127
127
def test_when_second_tuesday_is_some_day_in_the_middle_of_the_second_week (self ):
128
- self .assertEqual (meetup (2013 , 6 , "2nd " , "Tuesday" ), date (2013 , 6 , 11 ))
128
+ self .assertEqual (meetup (2013 , 6 , "second " , "Tuesday" ), date (2013 , 6 , 11 ))
129
129
130
130
def test_when_second_wednesday_is_some_day_in_the_middle_of_the_second_week (self ):
131
- self .assertEqual (meetup (2013 , 7 , "2nd " , "Wednesday" ), date (2013 , 7 , 10 ))
131
+ self .assertEqual (meetup (2013 , 7 , "second " , "Wednesday" ), date (2013 , 7 , 10 ))
132
132
133
133
def test_when_second_wednesday_is_the_14th_the_last_day_of_the_second_week (self ):
134
- self .assertEqual (meetup (2013 , 8 , "2nd " , "Wednesday" ), date (2013 , 8 , 14 ))
134
+ self .assertEqual (meetup (2013 , 8 , "second " , "Wednesday" ), date (2013 , 8 , 14 ))
135
135
136
136
def test_when_second_thursday_is_some_day_in_the_middle_of_the_second_week (self ):
137
- self .assertEqual (meetup (2013 , 9 , "2nd " , "Thursday" ), date (2013 , 9 , 12 ))
137
+ self .assertEqual (meetup (2013 , 9 , "second " , "Thursday" ), date (2013 , 9 , 12 ))
138
138
139
139
def test_when_second_thursday_is_another_day_in_the_middle_of_the_second_week (self ):
140
- self .assertEqual (meetup (2013 , 10 , "2nd " , "Thursday" ), date (2013 , 10 , 10 ))
140
+ self .assertEqual (meetup (2013 , 10 , "second " , "Thursday" ), date (2013 , 10 , 10 ))
141
141
142
142
def test_when_second_friday_is_the_8th_the_first_day_of_the_second_week (self ):
143
- self .assertEqual (meetup (2013 , 11 , "2nd " , "Friday" ), date (2013 , 11 , 8 ))
143
+ self .assertEqual (meetup (2013 , 11 , "second " , "Friday" ), date (2013 , 11 , 8 ))
144
144
145
145
def test_when_second_friday_is_some_day_in_the_middle_of_the_second_week (self ):
146
- self .assertEqual (meetup (2013 , 12 , "2nd " , "Friday" ), date (2013 , 12 , 13 ))
146
+ self .assertEqual (meetup (2013 , 12 , "second " , "Friday" ), date (2013 , 12 , 13 ))
147
147
148
148
def test_when_second_saturday_is_some_day_in_the_middle_of_the_second_week (self ):
149
- self .assertEqual (meetup (2013 , 1 , "2nd " , "Saturday" ), date (2013 , 1 , 12 ))
149
+ self .assertEqual (meetup (2013 , 1 , "second " , "Saturday" ), date (2013 , 1 , 12 ))
150
150
151
151
def test_when_second_saturday_is_another_day_in_the_middle_of_the_second_week (self ):
152
- self .assertEqual (meetup (2013 , 2 , "2nd " , "Saturday" ), date (2013 , 2 , 9 ))
152
+ self .assertEqual (meetup (2013 , 2 , "second " , "Saturday" ), date (2013 , 2 , 9 ))
153
153
154
154
def test_when_second_sunday_is_some_day_in_the_middle_of_the_second_week (self ):
155
- self .assertEqual (meetup (2013 , 3 , "2nd " , "Sunday" ), date (2013 , 3 , 10 ))
155
+ self .assertEqual (meetup (2013 , 3 , "second " , "Sunday" ), date (2013 , 3 , 10 ))
156
156
157
157
def test_when_second_sunday_is_the_14th_the_last_day_of_the_second_week (self ):
158
- self .assertEqual (meetup (2013 , 4 , "2nd " , "Sunday" ), date (2013 , 4 , 14 ))
158
+ self .assertEqual (meetup (2013 , 4 , "second " , "Sunday" ), date (2013 , 4 , 14 ))
159
159
160
160
def test_when_third_monday_is_some_day_in_the_middle_of_the_third_week (self ):
161
- self .assertEqual (meetup (2013 , 3 , "3rd " , "Monday" ), date (2013 , 3 , 18 ))
161
+ self .assertEqual (meetup (2013 , 3 , "third " , "Monday" ), date (2013 , 3 , 18 ))
162
162
163
163
def test_when_third_monday_is_the_15th_the_first_day_of_the_third_week (self ):
164
- self .assertEqual (meetup (2013 , 4 , "3rd " , "Monday" ), date (2013 , 4 , 15 ))
164
+ self .assertEqual (meetup (2013 , 4 , "third " , "Monday" ), date (2013 , 4 , 15 ))
165
165
166
166
def test_when_third_tuesday_is_the_21st_the_last_day_of_the_third_week (self ):
167
- self .assertEqual (meetup (2013 , 5 , "3rd " , "Tuesday" ), date (2013 , 5 , 21 ))
167
+ self .assertEqual (meetup (2013 , 5 , "third " , "Tuesday" ), date (2013 , 5 , 21 ))
168
168
169
169
def test_when_third_tuesday_is_some_day_in_the_middle_of_the_third_week (self ):
170
- self .assertEqual (meetup (2013 , 6 , "3rd " , "Tuesday" ), date (2013 , 6 , 18 ))
170
+ self .assertEqual (meetup (2013 , 6 , "third " , "Tuesday" ), date (2013 , 6 , 18 ))
171
171
172
172
def test_when_third_wednesday_is_some_day_in_the_middle_of_the_third_week (self ):
173
- self .assertEqual (meetup (2013 , 7 , "3rd " , "Wednesday" ), date (2013 , 7 , 17 ))
173
+ self .assertEqual (meetup (2013 , 7 , "third " , "Wednesday" ), date (2013 , 7 , 17 ))
174
174
175
175
def test_when_third_wednesday_is_the_21st_the_last_day_of_the_third_week (self ):
176
- self .assertEqual (meetup (2013 , 8 , "3rd " , "Wednesday" ), date (2013 , 8 , 21 ))
176
+ self .assertEqual (meetup (2013 , 8 , "third " , "Wednesday" ), date (2013 , 8 , 21 ))
177
177
178
178
def test_when_third_thursday_is_some_day_in_the_middle_of_the_third_week (self ):
179
- self .assertEqual (meetup (2013 , 9 , "3rd " , "Thursday" ), date (2013 , 9 , 19 ))
179
+ self .assertEqual (meetup (2013 , 9 , "third " , "Thursday" ), date (2013 , 9 , 19 ))
180
180
181
181
def test_when_third_thursday_is_another_day_in_the_middle_of_the_third_week (self ):
182
- self .assertEqual (meetup (2013 , 10 , "3rd " , "Thursday" ), date (2013 , 10 , 17 ))
182
+ self .assertEqual (meetup (2013 , 10 , "third " , "Thursday" ), date (2013 , 10 , 17 ))
183
183
184
184
def test_when_third_friday_is_the_15th_the_first_day_of_the_third_week (self ):
185
- self .assertEqual (meetup (2013 , 11 , "3rd " , "Friday" ), date (2013 , 11 , 15 ))
185
+ self .assertEqual (meetup (2013 , 11 , "third " , "Friday" ), date (2013 , 11 , 15 ))
186
186
187
187
def test_when_third_friday_is_some_day_in_the_middle_of_the_third_week (self ):
188
- self .assertEqual (meetup (2013 , 12 , "3rd " , "Friday" ), date (2013 , 12 , 20 ))
188
+ self .assertEqual (meetup (2013 , 12 , "third " , "Friday" ), date (2013 , 12 , 20 ))
189
189
190
190
def test_when_third_saturday_is_some_day_in_the_middle_of_the_third_week (self ):
191
- self .assertEqual (meetup (2013 , 1 , "3rd " , "Saturday" ), date (2013 , 1 , 19 ))
191
+ self .assertEqual (meetup (2013 , 1 , "third " , "Saturday" ), date (2013 , 1 , 19 ))
192
192
193
193
def test_when_third_saturday_is_another_day_in_the_middle_of_the_third_week (self ):
194
- self .assertEqual (meetup (2013 , 2 , "3rd " , "Saturday" ), date (2013 , 2 , 16 ))
194
+ self .assertEqual (meetup (2013 , 2 , "third " , "Saturday" ), date (2013 , 2 , 16 ))
195
195
196
196
def test_when_third_sunday_is_some_day_in_the_middle_of_the_third_week (self ):
197
- self .assertEqual (meetup (2013 , 3 , "3rd " , "Sunday" ), date (2013 , 3 , 17 ))
197
+ self .assertEqual (meetup (2013 , 3 , "third " , "Sunday" ), date (2013 , 3 , 17 ))
198
198
199
199
def test_when_third_sunday_is_the_21st_the_last_day_of_the_third_week (self ):
200
- self .assertEqual (meetup (2013 , 4 , "3rd " , "Sunday" ), date (2013 , 4 , 21 ))
200
+ self .assertEqual (meetup (2013 , 4 , "third " , "Sunday" ), date (2013 , 4 , 21 ))
201
201
202
202
def test_when_fourth_monday_is_some_day_in_the_middle_of_the_fourth_week (self ):
203
- self .assertEqual (meetup (2013 , 3 , "4th " , "Monday" ), date (2013 , 3 , 25 ))
203
+ self .assertEqual (meetup (2013 , 3 , "fourth " , "Monday" ), date (2013 , 3 , 25 ))
204
204
205
205
def test_when_fourth_monday_is_the_22nd_the_first_day_of_the_fourth_week (self ):
206
- self .assertEqual (meetup (2013 , 4 , "4th " , "Monday" ), date (2013 , 4 , 22 ))
206
+ self .assertEqual (meetup (2013 , 4 , "fourth " , "Monday" ), date (2013 , 4 , 22 ))
207
207
208
208
def test_when_fourth_tuesday_is_the_28th_the_last_day_of_the_fourth_week (self ):
209
- self .assertEqual (meetup (2013 , 5 , "4th " , "Tuesday" ), date (2013 , 5 , 28 ))
209
+ self .assertEqual (meetup (2013 , 5 , "fourth " , "Tuesday" ), date (2013 , 5 , 28 ))
210
210
211
211
def test_when_fourth_tuesday_is_some_day_in_the_middle_of_the_fourth_week (self ):
212
- self .assertEqual (meetup (2013 , 6 , "4th " , "Tuesday" ), date (2013 , 6 , 25 ))
212
+ self .assertEqual (meetup (2013 , 6 , "fourth " , "Tuesday" ), date (2013 , 6 , 25 ))
213
213
214
214
def test_when_fourth_wednesday_is_some_day_in_the_middle_of_the_fourth_week (self ):
215
- self .assertEqual (meetup (2013 , 7 , "4th " , "Wednesday" ), date (2013 , 7 , 24 ))
215
+ self .assertEqual (meetup (2013 , 7 , "fourth " , "Wednesday" ), date (2013 , 7 , 24 ))
216
216
217
217
def test_when_fourth_wednesday_is_the_28th_the_last_day_of_the_fourth_week (self ):
218
- self .assertEqual (meetup (2013 , 8 , "4th " , "Wednesday" ), date (2013 , 8 , 28 ))
218
+ self .assertEqual (meetup (2013 , 8 , "fourth " , "Wednesday" ), date (2013 , 8 , 28 ))
219
219
220
220
def test_when_fourth_thursday_is_some_day_in_the_middle_of_the_fourth_week (self ):
221
- self .assertEqual (meetup (2013 , 9 , "4th " , "Thursday" ), date (2013 , 9 , 26 ))
221
+ self .assertEqual (meetup (2013 , 9 , "fourth " , "Thursday" ), date (2013 , 9 , 26 ))
222
222
223
223
def test_when_fourth_thursday_is_another_day_in_the_middle_of_the_fourth_week (self ):
224
- self .assertEqual (meetup (2013 , 10 , "4th " , "Thursday" ), date (2013 , 10 , 24 ))
224
+ self .assertEqual (meetup (2013 , 10 , "fourth " , "Thursday" ), date (2013 , 10 , 24 ))
225
225
226
226
def test_when_fourth_friday_is_the_22nd_the_first_day_of_the_fourth_week (self ):
227
- self .assertEqual (meetup (2013 , 11 , "4th " , "Friday" ), date (2013 , 11 , 22 ))
227
+ self .assertEqual (meetup (2013 , 11 , "fourth " , "Friday" ), date (2013 , 11 , 22 ))
228
228
229
229
def test_when_fourth_friday_is_some_day_in_the_middle_of_the_fourth_week (self ):
230
- self .assertEqual (meetup (2013 , 12 , "4th " , "Friday" ), date (2013 , 12 , 27 ))
230
+ self .assertEqual (meetup (2013 , 12 , "fourth " , "Friday" ), date (2013 , 12 , 27 ))
231
231
232
232
def test_when_fourth_saturday_is_some_day_in_the_middle_of_the_fourth_week (self ):
233
- self .assertEqual (meetup (2013 , 1 , "4th " , "Saturday" ), date (2013 , 1 , 26 ))
233
+ self .assertEqual (meetup (2013 , 1 , "fourth " , "Saturday" ), date (2013 , 1 , 26 ))
234
234
235
235
def test_when_fourth_saturday_is_another_day_in_the_middle_of_the_fourth_week (self ):
236
- self .assertEqual (meetup (2013 , 2 , "4th " , "Saturday" ), date (2013 , 2 , 23 ))
236
+ self .assertEqual (meetup (2013 , 2 , "fourth " , "Saturday" ), date (2013 , 2 , 23 ))
237
237
238
238
def test_when_fourth_sunday_is_some_day_in_the_middle_of_the_fourth_week (self ):
239
- self .assertEqual (meetup (2013 , 3 , "4th " , "Sunday" ), date (2013 , 3 , 24 ))
239
+ self .assertEqual (meetup (2013 , 3 , "fourth " , "Sunday" ), date (2013 , 3 , 24 ))
240
240
241
241
def test_when_fourth_sunday_is_the_28th_the_last_day_of_the_fourth_week (self ):
242
- self .assertEqual (meetup (2013 , 4 , "4th " , "Sunday" ), date (2013 , 4 , 28 ))
242
+ self .assertEqual (meetup (2013 , 4 , "fourth " , "Sunday" ), date (2013 , 4 , 28 ))
243
243
244
244
def test_last_monday_in_a_month_with_four_mondays (self ):
245
245
self .assertEqual (meetup (2013 , 3 , "last" , "Monday" ), date (2013 , 3 , 25 ))
@@ -293,18 +293,18 @@ def test_when_last_sunday_in_february_in_a_non_leap_year_is_not_the_29th(self):
293
293
self .assertEqual (meetup (2015 , 2 , "last" , "Sunday" ), date (2015 , 2 , 22 ))
294
294
295
295
def test_when_first_friday_is_the_7th_the_last_day_of_the_first_week (self ):
296
- self .assertEqual (meetup (2012 , 12 , "1st " , "Friday" ), date (2012 , 12 , 7 ))
296
+ self .assertEqual (meetup (2012 , 12 , "first " , "Friday" ), date (2012 , 12 , 7 ))
297
297
298
298
# Additional tests for this track
299
299
300
300
def test_fifth_monday_of_march_2015 (self ):
301
- self .assertEqual (meetup (2015 , 3 , "5th " , "Monday" ), date (2015 , 3 , 30 ))
301
+ self .assertEqual (meetup (2015 , 3 , "fifth " , "Monday" ), date (2015 , 3 , 30 ))
302
302
303
303
def test_fifth_thursday_of_february_2024 (self ):
304
- self .assertEqual (meetup (2024 , 2 , "5th " , "Thursday" ), date (2024 , 2 , 29 ))
304
+ self .assertEqual (meetup (2024 , 2 , "fifth " , "Thursday" ), date (2024 , 2 , 29 ))
305
305
306
306
def test_fifth_saturday_of_february_2020 (self ):
307
- self .assertEqual (meetup (2020 , 2 , "5th " , "Saturday" ), date (2020 , 2 , 29 ))
307
+ self .assertEqual (meetup (2020 , 2 , "fifth " , "Saturday" ), date (2020 , 2 , 29 ))
308
308
309
309
def test_last_sunday_of_june_2024 (self ):
310
310
self .assertEqual (meetup (2024 , 6 , "last" , "Sunday" ), date (2024 , 6 , 30 ))
@@ -314,18 +314,18 @@ def test_teenth_friday_of_may_2022(self):
314
314
315
315
def test_nonexistent_fifth_monday_of_february_2022 (self ):
316
316
with self .assertRaises (MeetupDayException ) as err :
317
- meetup (2022 , 2 , "5th " , "Monday" )
317
+ meetup (2022 , 2 , "fifth " , "Monday" )
318
318
self .assertEqual (type (err .exception ), MeetupDayException )
319
319
self .assertEqual (err .exception .args [0 ], "That day does not exist." )
320
320
321
321
def test_nonexistent_fifth_friday_of_august_2022 (self ):
322
322
with self .assertRaises (MeetupDayException ) as err :
323
- meetup (2022 , 8 , "5th " , "Friday" )
323
+ meetup (2022 , 8 , "fifth " , "Friday" )
324
324
self .assertEqual (type (err .exception ), MeetupDayException )
325
325
self .assertEqual (err .exception .args [0 ], "That day does not exist." )
326
326
327
327
def test_nonexistent_fifth_thursday_of_may_2023 (self ):
328
328
with self .assertRaises (MeetupDayException ) as err :
329
- meetup (2023 , 5 , "5th " , "Thursday" )
329
+ meetup (2023 , 5 , "fifth " , "Thursday" )
330
330
self .assertEqual (type (err .exception ), MeetupDayException )
331
331
self .assertEqual (err .exception .args [0 ], "That day does not exist." )
0 commit comments