MCPcopy Index your code
hub / github.com/python/cpython / test_repr_subclass

Method test_repr_subclass

Lib/test/datetimetester.py:1248–1255  ·  view source on GitHub ↗

Subclasses should have bare names in the repr (gh-107773).

(self)

Source from the content-addressed store, hash-verified

1246 self.assertEqual(dt, dt2)
1247
1248 def test_repr_subclass(self):
1249 """Subclasses should have bare names in the repr (gh-107773)."""
1250 td = SubclassDate(1, 2, 3)
1251 self.assertEqual(repr(td), "SubclassDate(1, 2, 3)")
1252 td = SubclassDate(2014, 1, 1)
1253 self.assertEqual(repr(td), "SubclassDate(2014, 1, 1)")
1254 td = SubclassDate(2010, 10, day=10)
1255 self.assertEqual(repr(td), "SubclassDate(2010, 10, 10)")
1256
1257 def test_ordinal_conversions(self):
1258 # Check some fixed values.

Callers

nothing calls this directly

Calls 2

SubclassDateClass · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected