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

Method test_non_abstractness

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

Source from the content-addressed store, hash-verified

169 dt1.utcoffset()
170
171 def test_non_abstractness(self):
172 # In order to allow subclasses to get pickled, the C implementation
173 # wasn't able to get away with having __init__ raise
174 # NotImplementedError.
175 useless = tzinfo()
176 dt = datetime.max
177 self.assertRaises(NotImplementedError, useless.tzname, dt)
178 self.assertRaises(NotImplementedError, useless.utcoffset, dt)
179 self.assertRaises(NotImplementedError, useless.dst, dt)
180
181 def test_subclass_must_override(self):
182 class NotEnough(tzinfo):

Callers

nothing calls this directly

Calls 2

tzinfoClass · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected