Skip to content

Commit 8d68396

Browse files
committed
move test
1 parent 13d716b commit 8d68396

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
@@ -80,6 +80,13 @@ def test_absolute_path():
8080
assert stdout.find('Checking %s ...' % file1) >= 0
8181
assert stdout.find('Checking %s ...' % file2) >= 0
8282

83+
def test_progress_threads():
84+
create_compile_commands()
85+
ret, stdout, _ = cppcheck(['--project=' + os.path.realpath('proj2/' + COMPILE_COMMANDS_JSON), '-j2'])
86+
assert ret == 0, stdout
87+
assert stdout.find('1/2 files checked 76% done') >= 0
88+
assert stdout.find('2/2 files checked 100% done') >= 0
89+
8390
def test_gui_project_loads_compile_commands_1():
8491
create_compile_commands()
8592
ret, stdout, _ = cppcheck(['--project=proj2/proj2.cppcheck'])

0 commit comments

Comments
 (0)