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

Function test_suppress_project_absolute

test/cli/helloworld_test.py:286–299  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

284
285
286def test_suppress_project_absolute(tmp_path):
287 shutil.copytree(os.path.join(__script_dir, 'helloworld'), tmp_path / 'helloworld')
288 project_file = tmp_path / 'helloworld' / 'test.cppcheck'
289 create_gui_project_file(project_file,
290 paths=['.'],
291 suppressions=[{'fileName':'main.c', 'id':'zerodiv'}])
292
293 args = [
294 '--project={}'.format(project_file)
295 ]
296
297 ret, stdout, stderr = cppcheck(args)
298 assert ret == 0, stdout
299 assert stderr == ''
300
301@pytest.mark.parametrize("project_file", ["helloworld.cppcheck", "helloworld_slnx.cppcheck"])
302def test_exclude(project_file):

Callers

nothing calls this directly

Calls 4

create_gui_project_fileFunction · 0.90
cppcheckFunction · 0.90
formatMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected