MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_repr_subclass

Method test_repr_subclass

Lib/test/datetimetester.py:1243–1250  ·  view source on GitHub ↗

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

(self)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

SubclassDateClass · 0.85
reprFunction · 0.85
assertEqualMethod · 0.45

Tested by

no test coverage detected