Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
c9b39e08
Commit
c9b39e08
authored
Oct 03, 2018
by
Roman Yurchak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add pytest --run-xfail run option
parent
5728cfde
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
7 deletions
+13
-7
test/conftest.py
test/conftest.py
+3
-0
test/python_tests.txt
test/python_tests.txt
+3
-4
test/test_python.py
test/test_python.py
+7
-3
No files found.
test/conftest.py
View file @
c9b39e08
...
@@ -24,6 +24,9 @@ try:
...
@@ -24,6 +24,9 @@ try:
group
.
addoption
(
group
.
addoption
(
'--build-dir'
,
action
=
"store"
,
default
=
BUILD_PATH
,
'--build-dir'
,
action
=
"store"
,
default
=
BUILD_PATH
,
help
=
"Path to the build directory"
)
help
=
"Path to the build directory"
)
group
.
addoption
(
'--run-xfail'
,
action
=
"store_true"
,
help
=
"If provided, tests marked as xfail will be run"
)
except
ImportError
:
except
ImportError
:
pytest
=
None
pytest
=
None
...
...
test/python_tests.txt
View file @
c9b39e08
# Test modules with a failure reason after their name are either skipped
# Test modules with a failure reason after their name are either skipped
# or marked as a known failure in pytest.
# or marked as a known failure in pytest.
#
#
# Following reason codes are skipped, whithout running them, as they lead to
# Following reason codes are skipped, as they lead to segfaults:
# segfaults:
# - segfault-<syscall>: segfault in the corresponding system call.
# - segfault-<syscall>: segfault in the corresponding system call.
#
#
# While the below reason codes are marked as a known failure
, and are still
# While the below reason codes are marked as a known failure
. By default, they
#
executed:
#
are also skipped. To run them, provide --run-xfail argument to pytest,
# - platform-specific: This is testing something about a particular platform
# - platform-specific: This is testing something about a particular platform
# that isn't relevant here
# that isn't relevant here
# - async: relies on async
# - async: relies on async
...
...
test/test_python.py
View file @
c9b39e08
...
@@ -352,9 +352,13 @@ def test_cpython_core(python_test, selenium, request):
...
@@ -352,9 +352,13 @@ def test_cpython_core(python_test, selenium, request):
.
format
(
','
.
join
(
error_flags
)))
.
format
(
','
.
join
(
error_flags
)))
if
error_flags
:
if
error_flags
:
request
.
applymarker
(
pytest
.
mark
.
xfail
(
if
request
.
config
.
option
.
run_xfail
:
run
=
False
,
reason
=
'known failure with code "{}"'
request
.
applymarker
(
pytest
.
mark
.
xfail
(
.
format
(
','
.
join
(
error_flags
))))
run
=
False
,
reason
=
'known failure with code "{}"'
.
format
(
','
.
join
(
error_flags
))))
else
:
pytest
.
xfail
(
'known failure with code "{}"'
.
format
(
','
.
join
(
error_flags
)))
selenium
.
load_package
(
'test'
)
selenium
.
load_package
(
'test'
)
try
:
try
:
...
...
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