(self)
| 342 | self.assertRaises(TypeError, time.strptime, '2009', b'%Y') |
| 343 | |
| 344 | def test_strptime_exception_context(self): |
| 345 | # check that this doesn't chain exceptions needlessly (see #17572) |
| 346 | with self.assertRaises(ValueError) as e: |
| 347 | time.strptime('', '%D') |
| 348 | self.assertTrue(e.exception.__suppress_context__) |
| 349 | # additional check for stray % branch |
| 350 | with self.assertRaises(ValueError) as e: |
| 351 | time.strptime('%', '%') |
| 352 | self.assertTrue(e.exception.__suppress_context__) |
| 353 | |
| 354 | def test_strptime_leap_year(self): |
| 355 | # GH-70647: warns if parsing a format with a day and no year. |
nothing calls this directly
no test coverage detected