(self)
| 1232 | self.assertEqual(dt.day, 1) |
| 1233 | |
| 1234 | def test_roundtrip(self): |
| 1235 | for dt in (self.theclass(1, 2, 3), |
| 1236 | self.theclass.today()): |
| 1237 | # Verify dt -> string -> date identity. |
| 1238 | s = repr(dt) |
| 1239 | self.assertStartsWith(s, 'datetime.') |
| 1240 | s = s[9:] |
| 1241 | dt2 = eval(s) |
| 1242 | self.assertEqual(dt, dt2) |
| 1243 | |
| 1244 | # Verify identity via reconstructing from pieces. |
| 1245 | dt2 = self.theclass(dt.year, dt.month, dt.day) |
| 1246 | self.assertEqual(dt, dt2) |
| 1247 | |
| 1248 | def test_repr_subclass(self): |
| 1249 | """Subclasses should have bare names in the repr (gh-107773).""" |
nothing calls this directly
no test coverage detected