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

Method test_fromisoformat_subclass

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

Source from the content-addressed store, hash-verified

2074 self.assertEqual(actual, expected)
2075
2076 def test_fromisoformat_subclass(self):
2077 class DateSubclass(self.theclass):
2078 pass
2079
2080 dt = DateSubclass(2014, 12, 14)
2081
2082 dt_rt = DateSubclass.fromisoformat(dt.isoformat())
2083
2084 self.assertIsInstance(dt_rt, DateSubclass)
2085
2086 def test_fromisoformat_fails(self):
2087 # 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