(executor, code)
| 143 | |
| 144 | |
| 145 | def run_code(executor, code): |
| 146 | with io.StringIO() as output: |
| 147 | try: |
| 148 | with redirect_stdout(output): |
| 149 | executor(code) |
| 150 | raw_output = output.getvalue() |
| 151 | error = None |
| 152 | except BaseException as e: |
| 153 | raw_output = "" |
| 154 | error = str(e) |
| 155 | return raw_output, error |
| 156 | |
| 157 | |
| 158 | def run_single_process(pec, code, pid=None, mode="simple"): |
no outgoing calls
no test coverage detected