MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / test_missing_project

Function test_missing_project

test/cli/project_test.py:11–17  ·  view source on GitHub ↗
(project_ext)

Source from the content-addressed store, hash-verified

9
10@pytest.mark.parametrize("project_ext", ["json", "sln", "slnx", "vcxproj", "bpr", "cppcheck"])
11def test_missing_project(project_ext):
12 project_file = "file.{}".format(project_ext)
13
14 ret, stdout, stderr = cppcheck(['--project=' + project_file, '--template=cppcheck1'])
15 assert 1 == ret
16 assert "cppcheck: error: failed to open project '{}'. The file does not exist.\n".format(project_file) == stdout
17 assert "" == stderr
18
19
20def __test_project_error(tmpdir, ext, content, expected):

Callers

nothing calls this directly

Calls 2

cppcheckFunction · 0.90
formatMethod · 0.80

Tested by

no test coverage detected