(self)
| 2220 | self.assertEqual(dt.microsecond, 8000) |
| 2221 | |
| 2222 | def test_roundtrip(self): |
| 2223 | for dt in (self.theclass(1, 2, 3, 4, 5, 6, 7), |
| 2224 | self.theclass.now()): |
| 2225 | # Verify dt -> string -> datetime identity. |
| 2226 | s = repr(dt) |
| 2227 | self.assertStartsWith(s, 'datetime.') |
| 2228 | s = s[9:] |
| 2229 | dt2 = eval(s) |
| 2230 | self.assertEqual(dt, dt2) |
| 2231 | |
| 2232 | # Verify identity via reconstructing from pieces. |
| 2233 | dt2 = self.theclass(dt.year, dt.month, dt.day, |
| 2234 | dt.hour, dt.minute, dt.second, |
| 2235 | dt.microsecond) |
| 2236 | self.assertEqual(dt, dt2) |
| 2237 | |
| 2238 | def test_isoformat(self): |
| 2239 | t = self.theclass(1, 2, 3, 4, 5, 1, 123) |
nothing calls this directly
no test coverage detected