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

Function test_absolute_path

test/cli/proj2_test.py:77–86  ·  view source on GitHub ↗
(tmp_path)

Source from the content-addressed store, hash-verified

75 assert stdout.find('Checking %s ...' % file2) >= 0
76
77def test_absolute_path(tmp_path):
78 proj_dir = tmp_path / 'proj2'
79 shutil.copytree(__proj_dir, proj_dir)
80 __create_compile_commands(proj_dir)
81 ret, stdout, _ = cppcheck(['--project=' + os.path.join(proj_dir, __COMPILE_COMMANDS_JSON)], cwd=tmp_path)
82 file1 = os.path.join(proj_dir, 'a', 'a.c')
83 file2 = os.path.join(proj_dir, 'b', 'b.c')
84 assert ret == 0, stdout
85 assert stdout.find('Checking %s ...' % file1) >= 0
86 assert stdout.find('Checking %s ...' % file2) >= 0
87
88def test_gui_project_loads_compile_commands_1(tmp_path):
89 proj_dir = tmp_path / 'proj2'

Callers

nothing calls this directly

Calls 4

cppcheckFunction · 0.90
joinMethod · 0.45
findMethod · 0.45

Tested by

no test coverage detected