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

Method test_cannot_init

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

Source from the content-addressed store, hash-verified

5900 pass
5901
5902 def test_cannot_init(self):
5903 with self.assertRaises(TypeError):
5904 ClassVar()
5905 with self.assertRaises(TypeError):
5906 type(ClassVar)()
5907 with self.assertRaises(TypeError):
5908 type(ClassVar[Optional[int]])()
5909
5910 def test_no_isinstance(self):
5911 with self.assertRaises(TypeError):

Callers

nothing calls this directly

Calls 2

ClassVarFunction · 0.90
assertRaisesMethod · 0.45

Tested by

no test coverage detected