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

Method test_cannot_init

Lib/test/test_typing.py:9298–9304  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

9296 pass
9297
9298 def test_cannot_init(self):
9299 with self.assertRaises(TypeError):
9300 Required()
9301 with self.assertRaises(TypeError):
9302 type(Required)()
9303 with self.assertRaises(TypeError):
9304 type(Required[Optional[int]])()
9305
9306 def test_no_isinstance(self):
9307 with self.assertRaises(TypeError):

Callers

nothing calls this directly

Calls 2

RequiredFunction · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected