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
Labels
Merge Requests
139
Merge Requests
139
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
00cfb678
Commit
00cfb678
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
4a698602
Pipeline
#37465
failed with stage
in 0 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
+6
-1
No files found.
product/ERP5Type/tests/ERP5TypeFunctionalTestCase.py
View file @
00cfb678
...
@@ -392,12 +392,13 @@ class FunctionalTestRunner:
...
@@ -392,12 +392,13 @@ class FunctionalTestRunner:
else
:
else
:
test_table
=
tr
[
1
].
xpath
(
'.//table'
)[
0
]
test_table
=
tr
[
1
].
xpath
(
'.//table'
)[
0
]
status
=
tr
.
attrib
.
get
(
'class'
)
status
=
tr
.
attrib
.
get
(
'class'
)
is_expected_failure
=
u"expected failure"
in
etree
.
tostring
(
test_table
,
encoding
=
"unicode"
)
if
'status_failed'
in
status
:
if
'status_failed'
in
status
:
# XXX replace status_failed classes by an inline style supported by gadget_html_viewer
# 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")]'
):
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
u"expected failure"
in
etree
.
tostring
(
test_table
,
encoding
=
"unicode"
)
:
if
is_expected_failure
:
expected_failure_amount
+=
1
expected_failure_amount
+=
1
else
:
else
:
failure_amount
+=
1
failure_amount
+=
1
...
@@ -406,6 +407,10 @@ class FunctionalTestRunner:
...
@@ -406,6 +407,10 @@ class FunctionalTestRunner:
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
+=
unicode2str
(
etree
.
tostring
(
detail_element
,
encoding
=
"unicode"
))
detail
+=
unicode2str
(
etree
.
tostring
(
detail_element
,
encoding
=
"unicode"
))
elif
is_expected_failure
:
detail
+=
'Test {test_name} had unexpected success'
.
format
(
test_name
=
test_name
)
error_title_list
.
append
(
test_name
)
failure_amount
+=
1
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
:
...
...
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