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

Function __copy_cppcheck_premium

test/cli/premium_test.py:15–37  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

13
14
15def __copy_cppcheck_premium(tmpdir):
16 exe = shutil.copy2(__lookup_cppcheck_exe(), tmpdir)
17 if sys.platform == 'win32':
18 shutil.copy2(os.path.join(os.path.dirname(__lookup_cppcheck_exe()), 'cppcheck-core.dll'), tmpdir)
19
20 # add minimum cfg/std.cfg
21 test_cfg_folder = tmpdir.mkdir('cfg')
22 with open(test_cfg_folder.join('std.cfg'), 'wt') as f:
23 f.write('<?xml version="1.0"?>\n<def format="2"/>')
24
25 # add simple cppcheck.cfg
26 with open(tmpdir.join('cppcheck.cfg'), 'wt') as f:
27 f.write("""
28 {
29 "addons": [],
30 "productName": "NAME",
31 "about": "NAME",
32 "manualUrl" : "https://files.cppchecksolutions.com/manual.pdf",
33 "safety": true
34 }
35 """.replace('NAME', __PRODUCT_NAME))
36
37 return exe
38
39
40def test_misra_c_builtin_style_checks(tmpdir):

Callers 4

test_misra_pyFunction · 0.85
test_helpFunction · 0.85

Calls 4

__lookup_cppcheck_exeFunction · 0.90
joinMethod · 0.45
writeMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected