(self)
| 2339 | self.assertEqual(b.__format__(fmt), 'B') |
| 2340 | |
| 2341 | def test_more_ctime(self): |
| 2342 | # Test fields that TestDate doesn't touch. |
| 2343 | import time |
| 2344 | |
| 2345 | t = self.theclass(2002, 3, 2, 18, 3, 5, 123) |
| 2346 | self.assertEqual(t.ctime(), "Sat Mar 2 18:03:05 2002") |
| 2347 | # Oops! The next line fails on Win2K under MSVC 6, so it's commented |
| 2348 | # out. The difference is that t.ctime() produces " 2" for the day, |
| 2349 | # but platform ctime() produces "02" for the day. According to |
| 2350 | # C99, t.ctime() is correct here. |
| 2351 | # self.assertEqual(t.ctime(), time.ctime(time.mktime(t.timetuple()))) |
| 2352 | |
| 2353 | # So test a case where that difference doesn't matter. |
| 2354 | t = self.theclass(2002, 3, 22, 18, 3, 5, 123) |
| 2355 | self.assertEqual(t.ctime(), time.ctime(time.mktime(t.timetuple()))) |
| 2356 | |
| 2357 | def test_tz_independent_comparing(self): |
| 2358 | dt1 = self.theclass(2002, 3, 1, 9, 0, 0) |
nothing calls this directly
no test coverage detected