Commit b3b37333 authored by Jérome Perrin's avatar Jérome Perrin

ERP5TypeFunctionalTestCase: py3

parent 207b77e0
...@@ -398,7 +398,7 @@ class FunctionalTestRunner: ...@@ -398,7 +398,7 @@ class FunctionalTestRunner:
for test_tr in test_table.xpath('.//tr[contains(@class, "status_failed")]'): for test_tr in test_table.xpath('.//tr[contains(@class, "status_failed")]'):
test_tr.set('style', 'background-color: red;') test_tr.set('style', 'background-color: red;')
details_attribute_dict = {} details_attribute_dict = {}
if etree.tostring(test_table).find("expected failure") != -1: if "expected failure" in etree.tostring(test_table, encoding="unicode"):
expected_failure_amount += 1 expected_failure_amount += 1
else: else:
failure_amount += 1 failure_amount += 1
...@@ -406,7 +406,7 @@ class FunctionalTestRunner: ...@@ -406,7 +406,7 @@ class FunctionalTestRunner:
details_attribute_dict['open'] = 'true' details_attribute_dict['open'] = 'true'
detail_element = E.div() detail_element = E.div()
detail_element.append(E.details(E.summary(test_name), test_table, **details_attribute_dict)) detail_element.append(E.details(E.summary(test_name), test_table, **details_attribute_dict))
detail += etree.tostring(detail_element) detail += etree.tostring(detail_element, encoding="unicode")
tr_count += 1 tr_count += 1
success_amount = tr_count - 1 - failure_amount - expected_failure_amount success_amount = tr_count - 1 - failure_amount - expected_failure_amount
if detail: if detail:
......
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