Skip to content

Commit

Permalink
move test
Browse files Browse the repository at this point in the history
  • Loading branch information
ludviggunne committed Nov 14, 2024
1 parent 13d716b commit 8d68396
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 deletions.
11 changes: 0 additions & 11 deletions test/cli/other_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,17 +195,6 @@ def test_progress_j(tmpdir):
assert stdout == "Checking {} ...\n".format(test_file)
assert stderr == ""

def test_progress_proj_j(tmpdir):
args = ['--project=proj2/proj2.cppcheck', '-j2']

exitcode, stdout, stderr = cppcheck(args)

progress_lines = '\n'.join(list(filter(lambda l: not l.startswith("Checking"), stdout.split('\n'))))

assert (progress_lines ==
"1/2 files checked 76% done\n"
"2/2 files checked 100% done\n")
assert exitcode == 0

def test_execute_addon_failure(tmpdir):
test_file = os.path.join(tmpdir, 'test.cpp')
Expand Down
7 changes: 7 additions & 0 deletions test/cli/proj2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ def test_absolute_path():
assert stdout.find('Checking %s ...' % file1) >= 0
assert stdout.find('Checking %s ...' % file2) >= 0

def test_progress_threads():
create_compile_commands()
ret, stdout, _ = cppcheck(['--project=' + os.path.realpath('proj2/' + COMPILE_COMMANDS_JSON), '-j2'])
assert ret == 0, stdout
assert stdout.find('1/2 files checked 76% done') >= 0
assert stdout.find('2/2 files checked 100% done') >= 0

def test_gui_project_loads_compile_commands_1():
create_compile_commands()
ret, stdout, _ = cppcheck(['--project=proj2/proj2.cppcheck'])
Expand Down

0 comments on commit 8d68396

Please sign in to comment.