Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit359116b

Browse files
committed
List all non-passing tests in test summaries
This changes the default in pyproject.toml so that pytest listsa line for each non-passing test at the end of a run, showing thetest name and, where available, condensed information about thestatus, such as the "reason" argument for an xfailing or skippedtest.Previously only failed and errored tests were listed in thesummary. Now skipped, xfailed, and xpassed tests are listed too.The benefit is in keeping track of the status of tests. Althoughshowing the full failure output with stack trace and relevant codeunder test would be too distracting for tests marked xfail, it isvaluable to not merely run those tests but be able to see a lineshowing their names and statuses. Likewise, a number of tests arecurrently marked skipped, and while some of them are skipped on aparticular platform because they don't make sense to run on thatplatform, a number of others are skipped by raising SkipTest inresponse to a failure condition on Windows. (Those consist mostlyof the tests skipped as a result of code discussed in#790.)This also has the more specific benefit of making it easier to marktests as xfail in order to add CI jobs for native Windows, and moreimportantly to allow information about their status to later beused to understand and fix bugs on Windows.)
1 parent74cc671 commit359116b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

‎pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ requires = ["setuptools"]
33
build-backend ="setuptools.build_meta"
44

55
[tool.pytest.ini_options]
6-
addopts ="--cov=git --cov-report=term --disable-warnings"
6+
addopts ="--cov=git --cov-report=term --disable-warnings -ra"
77
filterwarnings ="ignore::DeprecationWarning"
88
python_files ="test_*.py"
99
tmp_path_retention_policy ="failed"
@@ -14,8 +14,8 @@ testpaths = "test" # Space separated list of paths from root e.g test tests doc
1414
# --cov-report html:path # html file at path
1515
# --maxfail # number of errors before giving up
1616
# -disable-warnings # Disable pytest warnings (not codebase warnings)
17-
# -rf # increased reporting of failures
18-
# -rE #increased reporting of errors
17+
# -rfE # default test summary: list fail and error
18+
# -ra #test summary: list all non-passing (fail, error, skip, xfail, xpass)
1919
# --ignore-glob=**/gitdb/* # ignore glob paths
2020
# filterwarnings ignore::WarningType # ignores those warnings
2121

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp