Skip to content

8.0.0rc2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 17 Jan 21:41
· 429 commits to main since this release

pytest 8.0.0rc2 (2024-01-17)

Improvements

  • #11233: Improvements to -r for xfailures and xpasses:
    • Report tracebacks for xfailures when -rx is set.
    • Report captured output for xpasses when -rX is set.
    • For xpasses, add - in summary between test name and reason, to match how xfail is displayed.
  • #11825: The pytest_plugin_registered{.interpreted-text role="hook"} hook has a new plugin_name parameter containing the name by which plugin is registered.

Bug Fixes

  • #11706: Fix reporting of teardown errors in higher-scoped fixtures when using [--maxfail]{.title-ref} or [--stepwise]{.title-ref}.

  • #11758: Fixed IndexError: string index out of range crash in if highlighted[-1] == "\n" and source[-1] != "\n".
    This bug was introduced in pytest 8.0.0rc1.

  • #9765, #11816: Fixed a frustrating bug that afflicted some users with the only error being assert mod not in mods. The issue was caused by the fact that str(Path(mod)) and mod.__file__ don't necessarily produce the same string, and was being erroneously used interchangably in some places in the code.

    This fix also broke the internal API of PytestPluginManager.consider_conftest by introducing a new parameter -- we mention this in case it is being used by external code, even if marked as private.