(self)
| 1203 | |
| 1204 | @warnings_helper.ignore_warnings(category=DeprecationWarning) |
| 1205 | def test_strptime_leap_year(self): |
| 1206 | # GH-70647: warns if parsing a format with a day and no year. |
| 1207 | with self.assertRaises(ValueError): |
| 1208 | # The existing behavior that GH-70647 seeks to change. |
| 1209 | date.strptime('02-29', '%m-%d') |
| 1210 | with self._assertNotWarns(DeprecationWarning): |
| 1211 | date.strptime('20-03-14', '%y-%m-%d') |
| 1212 | date.strptime('02-29,2024', '%m-%d,%Y') |
| 1213 | |
| 1214 | class SubclassDate(date): |
| 1215 | sub_var = 1 |
nothing calls this directly
no test coverage detected