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

Function test_join_matches_subprocess

numpy/distutils/tests/test_shell_utils.py:55–66  ·  view source on GitHub ↗

Test that join produces strings understood by subprocess

(Parser, runner, argv)

Source from the content-addressed store, hash-verified

53@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")
54@pytest.mark.parametrize('argv', argv_cases)
55def test_join_matches_subprocess(Parser, runner, argv):
56 """
57 Test that join produces strings understood by subprocess
58 """
59 # invoke python to return its arguments as json
60 cmd = [
61 sys.executable, '-c',
62 'import json, sys; print(json.dumps(sys.argv[1:]))'
63 ]
64 joined = Parser.join(cmd + argv)
65 json_out = runner(joined).decode()
66 assert json.loads(json_out) == argv
67
68
69@pytest.mark.skipif(IS_WASM, reason="Cannot start subprocess")

Callers

nothing calls this directly

Calls 3

runnerFunction · 0.85
decodeMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected