(self)
| 1630 | t.strftime(format="%f") |
| 1631 | |
| 1632 | def test_strftime_trailing_percent(self): |
| 1633 | # bpo-35066: Make sure trailing '%' doesn't cause datetime's strftime to |
| 1634 | # complain. Different libcs have different handling of trailing |
| 1635 | # percents, so we simply check datetime's strftime acts the same as |
| 1636 | # time.strftime. |
| 1637 | t = self.theclass(2005, 3, 2) |
| 1638 | try: |
| 1639 | _time.strftime('%') |
| 1640 | except ValueError: |
| 1641 | self.skipTest('time module does not support trailing %') |
| 1642 | self.assertEqual(t.strftime('%'), _time.strftime('%', t.timetuple())) |
| 1643 | self.assertEqual( |
| 1644 | t.strftime("m:%m d:%d y:%y %"), |
| 1645 | _time.strftime("m:03 d:02 y:05 %", t.timetuple()), |
| 1646 | ) |
| 1647 | |
| 1648 | def test_format(self): |
| 1649 | dt = self.theclass(2007, 9, 10) |
nothing calls this directly
no test coverage detected