(self)
| 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 |
| 506 | bad_shared = {"\uD82A": 0} |
| 507 | msg = 'surrogates not allowed' |
| 508 | with self.assertRaisesRegex(UnicodeEncodeError, msg): |
| 509 | _interpreters.exec(self.id, 'a', shared=bad_shared) |
| 510 | with self.assertRaisesRegex(UnicodeEncodeError, msg): |
| 511 | _interpreters.run_string(self.id, 'a', shared=bad_shared) |
| 512 | with self.assertRaisesRegex(UnicodeEncodeError, msg): |
| 513 | _interpreters.run_func(self.id, lambda: None, shared=bad_shared) |
| 514 | |
| 515 | |
| 516 | class RunStringTests(TestBase): |
nothing calls this directly
no test coverage detected