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

Method test_invalid_shared_none

Lib/test/test__interpreters.py:493–502  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

491 _interpreters.set___main___attrs(self.id, 1)
492
493 def test_invalid_shared_none(self):
494 msg = r'must be dict, not None'
495 with self.assertRaisesRegex(TypeError, msg):
496 _interpreters.exec(self.id, 'a', shared=None)
497 with self.assertRaisesRegex(TypeError, msg):
498 _interpreters.run_string(self.id, 'a', shared=None)
499 with self.assertRaisesRegex(TypeError, msg):
500 _interpreters.run_func(self.id, lambda: None, shared=None)
501 with self.assertRaisesRegex(TypeError, msg):
502 _interpreters.set___main___attrs(self.id, None)
503
504 def test_invalid_shared_encoding(self):
505 # See https://github.com/python/cpython/issues/127196

Callers

nothing calls this directly

Calls 2

assertRaisesRegexMethod · 0.80
execMethod · 0.80

Tested by

no test coverage detected