(Parser)
| 38 | |
| 39 | @pytest.fixture |
| 40 | def runner(Parser): |
| 41 | if Parser != _shell_utils.NativeParser: |
| 42 | pytest.skip('Unable to run with non-native parser') |
| 43 | |
| 44 | if Parser == _shell_utils.WindowsParser: |
| 45 | return lambda cmd: subprocess.check_output(cmd) |
| 46 | elif Parser == _shell_utils.PosixParser: |
| 47 | # posix has no non-shell string parsing |
| 48 | return lambda cmd: subprocess.check_output(cmd, shell=True) |
| 49 | else: |
| 50 | raise NotImplementedError |
| 51 | |
| 52 | |
| 53 | @pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess") |
no test coverage detected