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

Function test_relative_path

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

Source from the content-addressed store, hash-verified

64 assert stdout.find('AAA') >= 0
65
66def test_relative_path(tmp_path):
67 proj_dir = tmp_path / 'proj2'
68 shutil.copytree(__proj_dir, proj_dir)
69 __create_compile_commands(proj_dir)
70 ret, stdout, _ = cppcheck(['--project=proj2/' + __COMPILE_COMMANDS_JSON], cwd=tmp_path)
71 file1 = os.path.join('proj2', 'a', 'a.c')
72 file2 = os.path.join('proj2', 'b', 'b.c')
73 assert ret == 0, stdout
74 assert stdout.find('Checking %s ...' % file1) >= 0
75 assert stdout.find('Checking %s ...' % file2) >= 0
76
77def test_absolute_path(tmp_path):
78 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