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

Method test_fromisoformat_subclass

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

Source from the content-addressed store, hash-verified

5007 self.theclass.fromisoformat(bad_type)
5008
5009 def test_fromisoformat_subclass(self):
5010 class TimeSubclass(self.theclass):
5011 pass
5012
5013 tsc = TimeSubclass(12, 14, 45, 203745, tzinfo=timezone.utc)
5014 tsc_rt = TimeSubclass.fromisoformat(tsc.isoformat())
5015
5016 self.assertEqual(tsc, tsc_rt)
5017 self.assertIsInstance(tsc_rt, TimeSubclass)
5018
5019 def test_subclass_timetz(self):
5020

Callers

nothing calls this directly

Calls 5

assertIsInstanceMethod · 0.80
TimeSubclassClass · 0.70
fromisoformatMethod · 0.45
isoformatMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected