MCPcopy Index your code
hub / github.com/pre-commit/pre-commit / test_cmd_output_no_shebang

Function test_cmd_output_no_shebang

tests/util_test.py:89–97  ·  view source on GitHub ↗
(tmpdir, fn)

Source from the content-addressed store, hash-verified

87
88@pytest.mark.parametrize('fn', (cmd_output_b, cmd_output_p))
89def test_cmd_output_no_shebang(tmpdir, fn):
90 f = tmpdir.join('f').ensure()
91 make_executable(f)
92
93 # previously this raised `OSError` -- the output is platform specific
94 ret, out, _ = fn(str(f), check=False, stderr=subprocess.STDOUT)
95 assert ret == 1
96 assert isinstance(out, bytes)
97 assert out.endswith(b'\n')
98
99
100def test_rmtree_read_only_directories(tmpdir):

Callers

nothing calls this directly

Calls 1

make_executableFunction · 0.90

Tested by

no test coverage detected