Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Carlos Ramos Carreño
erp5
Commits
160b1f38
Commit
160b1f38
authored
Nov 11, 2023
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5TypeFunctionalTestCase: report unexpected success as failure
parent
a188dd1c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+9
-5
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
160b1f38
...
...
@@ -387,20 +387,20 @@ class FunctionalTestRunner:
if
tr_count
:
# First td is the main title
test_name
=
tr
[
0
][
0
].
text
error
=
False
if
len
(
tr
)
==
1
:
# Test was not executed
detail
+=
'
Test '
+
test_name
+
' not executed
'
detail
+=
'
<code>'
+
test_name
+
'</code> not executed<br/>
'
error_title_list
.
append
(
test_name
)
else
:
test_table
=
tr
[
1
].
xpath
(
'.//table'
)[
0
]
status
=
tr
.
attrib
.
get
(
'class'
)
if
'status_failed'
in
status
:
is_expected_failure
=
etree
.
tostring
(
test_table
).
find
(
"expected failure"
)
!=
-
1
if
'status_failed'
in
tr
.
attrib
[
'class'
]
:
# XXX replace status_failed classes by an inline style supported by gadget_html_viewer
for
test_tr
in
test_table
.
xpath
(
'.//tr[contains(@class, "status_failed")]'
):
test_tr
.
set
(
'style'
,
'background-color: red;'
)
details_attribute_dict
=
{}
if
etree
.
tostring
(
test_table
).
find
(
"expected failure"
)
!=
-
1
:
if
is_expected_failure
:
test_name
=
test_name
+
' (expected failure)'
expected_failure_amount
+=
1
else
:
failure_amount
+=
1
...
...
@@ -409,6 +409,10 @@ class FunctionalTestRunner:
detail_element
=
E
.
div
()
detail_element
.
append
(
E
.
details
(
E
.
summary
(
test_name
),
test_table
,
**
details_attribute_dict
))
detail
+=
etree
.
tostring
(
detail_element
)
elif
is_expected_failure
:
detail
+=
'<code>'
+
test_name
+
'</code> had unexpected success<br/>'
error_title_list
.
append
(
test_name
)
failure_amount
+=
1
tr_count
+=
1
success_amount
=
tr_count
-
1
-
failure_amount
-
expected_failure_amount
if
detail
:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment