(self)
| 473 | self.id = _interpreters.create() |
| 474 | |
| 475 | def test_signatures(self): |
| 476 | # See https://github.com/python/cpython/issues/126654 |
| 477 | msg = r"exec\(\) argument 'shared' must be dict, not int" |
| 478 | with self.assertRaisesRegex(TypeError, msg): |
| 479 | _interpreters.exec(self.id, 'a', 1) |
| 480 | with self.assertRaisesRegex(TypeError, msg): |
| 481 | _interpreters.exec(self.id, 'a', shared=1) |
| 482 | msg = r"run_string\(\) argument 'shared' must be dict, not int" |
| 483 | with self.assertRaisesRegex(TypeError, msg): |
| 484 | _interpreters.run_string(self.id, 'a', shared=1) |
| 485 | msg = r"run_func\(\) argument 'shared' must be dict, not int" |
| 486 | with self.assertRaisesRegex(TypeError, msg): |
| 487 | _interpreters.run_func(self.id, lambda: None, shared=1) |
| 488 | # See https://github.com/python/cpython/issues/135855 |
| 489 | msg = r"set___main___attrs\(\) argument 'updates' must be dict, not int" |
| 490 | with self.assertRaisesRegex(TypeError, msg): |
| 491 | _interpreters.set___main___attrs(self.id, 1) |
| 492 | |
| 493 | def test_invalid_shared_none(self): |
| 494 | msg = r'must be dict, not None' |
nothing calls this directly
no test coverage detected