Skip to content

Commit 6a53010

Browse files
committed
fix
1 parent ea0cca9 commit 6a53010

1 file changed

Lines changed: 14 additions & 16 deletions

File tree

test/cli/other_test.py

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,22 +1076,20 @@ def test_markup_j(tmpdir):
10761076
assert exitcode == 0, stdout if stdout else stderr
10771077
lines = stdout.splitlines()
10781078
for i in range(1, 5):
1079-
lines.remove('{}/4 files checked 0% done'.format(i))
1080-
1081-
# this test started to fail in the -j2 injection run when using ThreadExecutor although it always specifies -j2.
1082-
# the order of the files in the output changed so just check for the file extentions
1083-
assert len(lines) == 4
1084-
assert lines[0].endswith('.cpp ...')
1085-
assert lines[1].endswith('.cpp ...')
1086-
assert lines[2].endswith('.qml ...')
1087-
assert lines[3].endswith('.qml ...')
1088-
1089-
#assert lines == [
1090-
# 'Checking {} ...'.format(test_file_2),
1091-
# 'Checking {} ...'.format(test_file_4),
1092-
# 'Checking {} ...'.format(test_file_1),
1093-
# 'Checking {} ...'.format(test_file_3)
1094-
#]
1079+
try:
1080+
if '{}/4 files checked 0% done'.format(i) in lines:
1081+
lines.remove('{}/4 files checked 0% done'.format(i))
1082+
else:
1083+
lines.remove('{}/4 files checked {}% done'.format(i, i * 20))
1084+
except ValueError as e:
1085+
assert False, str(e)
1086+
1087+
assert sorted(lines) == [
1088+
'Checking {} ...'.format(test_file_1),
1089+
'Checking {} ...'.format(test_file_2),
1090+
'Checking {} ...'.format(test_file_3),
1091+
'Checking {} ...'.format(test_file_4)
1092+
]
10951093
assert stderr == ''
10961094

10971095

0 commit comments

Comments
 (0)