(self)
| 2966 | |
| 2967 | @warnings_helper.ignore_warnings(category=DeprecationWarning) |
| 2968 | def test_strptime_leap_year(self): |
| 2969 | # GH-70647: warns if parsing a format with a day and no year. |
| 2970 | with self.assertRaises(ValueError): |
| 2971 | # The existing behavior that GH-70647 seeks to change. |
| 2972 | self.theclass.strptime('02-29', '%m-%d') |
| 2973 | with self.assertWarnsRegex(DeprecationWarning, |
| 2974 | r'.*day of month without a year.*'): |
| 2975 | self.theclass.strptime('03-14.159265', '%m-%d.%f') |
| 2976 | with self._assertNotWarns(DeprecationWarning): |
| 2977 | self.theclass.strptime('20-03-14.159265', '%y-%m-%d.%f') |
| 2978 | with self._assertNotWarns(DeprecationWarning): |
| 2979 | self.theclass.strptime('02-29,2024', '%m-%d,%Y') |
| 2980 | |
| 2981 | def test_more_timetuple(self): |
| 2982 | # This tests fields beyond those tested by the TestDate.test_timetuple. |
nothing calls this directly
no test coverage detected