(tmp_path)
| 284 | |
| 285 | |
| 286 | def 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"]) |
| 302 | def test_exclude(project_file): |
nothing calls this directly
no test coverage detected