Skip to content

Commit 9ed5578

Browse files
committed
move test
1 parent e880456 commit 9ed5578

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
@@ -196,17 +196,6 @@ def test_progress_j(tmpdir):
196196
assert stdout == "Checking {} ...\n".format(test_file)
197197
assert stderr == ""
198198

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

211200
def test_execute_addon_failure(tmpdir):
212201
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)