(code: str, inputs: List[List[Any]], entry_point: str)
| 81 | code: str, inputs: List[List[Any]], entry_point: str, mode="branch" |
| 82 | ): |
| 83 | def safety_test(code: str, inputs: List[List[Any]], entry_point: str): |
| 84 | for input_list in inputs: |
| 85 | code += f"{entry_point}({construct_inputs_sig(input_list)})\n" |
| 86 | reliability_guard() |
| 87 | try: |
| 88 | with swallow_io(): |
| 89 | with time_limit(1): |
| 90 | exec(code, {}) |
| 91 | except: |
| 92 | sys.exit(1) |
| 93 | |
| 94 | p = multiprocessing.Process(target=safety_test, args=(code, inputs, entry_point)) |
| 95 | p.start() |
nothing calls this directly
no test coverage detected