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

Function test_main

tests/check_json_test.py:17–22  ·  view source on GitHub ↗
(capsys, filename, expected_retval)

Source from the content-addressed store, hash-verified

15 ),
16)
17def test_main(capsys, filename, expected_retval):
18 ret = main([get_resource_path(filename)])
19 assert ret == expected_retval
20 if expected_retval == 1:
21 stdout, _ = capsys.readouterr()
22 assert filename in stdout
23
24
25def test_non_utf8_file(tmpdir):

Callers

nothing calls this directly

Calls 2

mainFunction · 0.90
get_resource_pathFunction · 0.90

Tested by

no test coverage detected