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

Class E

Lib/test/test_typing.py:2193–2194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2191 with self.assertRaisesRegex(TypeError,
2192 r'Cannot subclass int \| str'):
2193 class E(Union[int, str]):
2194 pass
2195
2196 def test_cannot_instantiate(self):
2197 with self.assertRaises(TypeError):

Calls

no outgoing calls

Tested by 2