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

Function test_addon_lookup_notfound_compdb

test/cli/lookup_test.py:841–856  ·  view source on GitHub ↗
(tmpdir)

Source from the content-addressed store, hash-verified

839
840
841def test_addon_lookup_notfound_compdb(tmpdir):
842 compdb_file, _ = __create_compdb(tmpdir)
843
844 exitcode, stdout, _, exe = cppcheck_ex(['--debug-lookup=addon', '--addon=none', '--project={}'.format(compdb_file)])
845 exepath = os.path.dirname(exe)
846 exepath_sep = exepath + os.path.sep
847 if sys.platform == 'win32':
848 exepath_sep = exepath_sep.replace('\\', '/')
849 assert exitcode == 1, stdout
850 lines = stdout.splitlines()
851 assert lines == [
852 "looking for addon 'none.py'",
853 "looking for addon '{}none.py'".format(exepath_sep),
854 "looking for addon '{}addons/none.py'".format(exepath_sep),
855 'Did not find addon none.py'
856 ]
857
858
859def test_addon_lookup_ext_notfound(tmpdir):

Callers

nothing calls this directly

Calls 4

cppcheck_exFunction · 0.90
formatMethod · 0.80
__create_compdbFunction · 0.70
replaceMethod · 0.45

Tested by

no test coverage detected