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

Function test_suppress_project_relative

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

Source from the content-addressed store, hash-verified

268 assert stderr == ''
269
270def test_suppress_project_relative(tmp_path):
271 shutil.copytree(os.path.join(__script_dir, 'helloworld'), tmp_path / 'helloworld')
272 project_file = os.path.join('helloworld', 'test.cppcheck')
273 create_gui_project_file(tmp_path / project_file,
274 paths=['.'],
275 suppressions=[{'fileName':'main.c', 'id':'zerodiv'}])
276
277 args = [
278 '--project={}'.format(project_file)
279 ]
280
281 ret, stdout, stderr = cppcheck(args, cwd=tmp_path)
282 assert ret == 0, stdout
283 assert stderr == ''
284
285
286def test_suppress_project_absolute(tmp_path):

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