(self, interpid, *, main=False)
| 658 | @requires_test_modules |
| 659 | @contextlib.contextmanager |
| 660 | def running_from_capi(self, interpid, *, main=False): |
| 661 | def run_interp(script): |
| 662 | text = self.run_from_capi(interpid, script, main=main) |
| 663 | assert text == '', repr(text) |
| 664 | def exec_interp(script): |
| 665 | rc = _testinternalcapi.exec_interpreter(interpid, script) |
| 666 | assert rc == 0, rc |
| 667 | with self._running(run_interp, exec_interp): |
| 668 | yield |
| 669 | |
| 670 | @requires_test_modules |
| 671 | def run_temp_from_capi(self, script, config='legacy'): |