MCPcopy Create free account
hub / github.com/numpy/numpy / runner

Function runner

numpy/distutils/tests/test_shell_utils.py:40–50  ·  view source on GitHub ↗
(Parser)

Source from the content-addressed store, hash-verified

38
39@pytest.fixture
40def 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")

Callers 1

Calls 1

check_outputMethod · 0.45

Tested by

no test coverage detected