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