Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 0f8cd4c

Browse filesBrowse files
committed
Treat XPASS status as a test failure
This causes full "failure" output to be printed when a test marked xfail unexpectedly passes, and for the test run to be considered failing as a result. The immediate purpose of this change is to facilitate efficient identification of recently introduced wrong or overbroad xfail markings. This behavior may eventually become the pytest default (see #1728 and references therein), and this could be retained even after the current xpassing tests are investigated, to facilitate timely detection of tests marked xfail of code that is newly working. (Individual tests decorated `@pytest.mark.xfail` can still be allowed to unexpectedly pass without it being treated like a test failure, by passing strict=False explicitly.)
1 parent 2875ffa commit 0f8cd4c
Copy full SHA for 0f8cd4c

File tree

Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-0
lines changed

‎pyproject.toml

Copy file name to clipboardExpand all lines: pyproject.toml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ filterwarnings = "ignore::DeprecationWarning"
88
python_files = "test_*.py"
99
tmp_path_retention_policy = "failed"
1010
testpaths = "test" # Space separated list of paths from root e.g test tests doc/testing.
11+
xfail_strict = true # Treat the XPASS status as a test failure (unless strict=False is passed).
1112
# --cov coverage
1213
# --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml
1314
# --cov-report term-missing # to terminal with line numbers

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.