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

Method test_fromisoformat_subclass

Lib/test/datetimetester.py:2071–2079  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2069 self.assertEqual(actual, expected)
2070
2071 def test_fromisoformat_subclass(self):
2072 class DateSubclass(self.theclass):
2073 pass
2074
2075 dt = DateSubclass(2014, 12, 14)
2076
2077 dt_rt = DateSubclass.fromisoformat(dt.isoformat())
2078
2079 self.assertIsInstance(dt_rt, DateSubclass)
2080
2081 def test_fromisoformat_fails(self):
2082 # Test that fromisoformat() fails on invalid values

Callers

nothing calls this directly

Calls 4

assertIsInstanceMethod · 0.80
DateSubclassClass · 0.70
fromisoformatMethod · 0.45
isoformatMethod · 0.45

Tested by

no test coverage detected