Skip to content

Commit 7048993

Browse files
committed
move test
1 parent feaded6 commit 7048993

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

test/cli/other_test.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -195,17 +195,6 @@ def test_progress_j(tmpdir):
195195
assert stdout == "Checking {} ...\n".format(test_file)
196196
assert stderr == ""
197197

198-
def test_progress_proj_j(tmpdir):
199-
args = ['--project=proj2/proj2.cppcheck', '-j2']
200-
201-
exitcode, stdout, stderr = cppcheck(args)
202-
203-
progress_lines = '\n'.join(list(filter(lambda l: not l.startswith("Checking"), stdout.split('\n'))))
204-
205-
assert (progress_lines ==
206-
"1/2 files checked 76% done\n"
207-
"2/2 files checked 100% done\n")
208-
assert exitcode == 0
209198

210199
def test_execute_addon_failure(tmpdir):
211200
test_file = os.path.join(tmpdir, 'test.cpp')

test/cli/proj2_test.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,13 @@ def test_absolute_path():
7373
assert stdout.find('Checking %s ...' % file1) >= 0
7474
assert stdout.find('Checking %s ...' % file2) >= 0
7575

76+
def test_progress_threads():
77+
create_compile_commands()
78+
ret, stdout, _ = cppcheck(['--project=' + os.path.realpath('proj2/' + COMPILE_COMMANDS_JSON), '-j2'])
79+
assert ret == 0, stdout
80+
assert stdout.find('1/2 files checked 76% done') >= 0
81+
assert stdout.find('2/2 files checked 100% done') >= 0
82+
7683
def test_gui_project_loads_compile_commands_1():
7784
__create_compile_commands()
7885
ret, stdout, _ = cppcheck(['--project=proj2/proj2.cppcheck'], cwd=__script_dir)

0 commit comments

Comments
 (0)