Commit 3419474a authored by Jérome Perrin's avatar Jérome Perrin

tests: fix counting selenium failures

1b1dbf60 (tests: also consider python unittest failures in
functional tests, 2021-06-16) was not counting properly the cases
where we have selenium failures. In that case we only want to count
selenium failures, if we add with the python failures from
status_dict, we report one extra failures.

The correct approach is to count selenium failures if any and otherwise
count python failures
Co-authored-by: Vincent Pelletier's avatarVincent Pelletier <vincent@nexedi.com>
parent 537aebad
......@@ -161,7 +161,7 @@ class ERP5(_ERP5):
if search:
group_dict = search.groupdict()
status_dict['failure_count'] = int(group_dict['failures']) \
+ int(status_dict.get('failure_count', 0))
or int(status_dict.get('failure_count', 0))
status_dict['test_count'] = int(group_dict['total'])
status_dict['skip_count'] = int(group_dict['expected_failure'])
return status_dict
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment