Skip to content

[prerelease] pytest.warns() doesn't seem to work properly for coverage.py #9386

Closed
@The-Compiler

Description

@The-Compiler

From @nedbat via Twitter:

This message could be better, because removing None doesn’t work now:

PytestRemovedIn8Warning: Passing None to catch any warning has been deprecated, pass no arguments instead:
  Replace pytest.warns(None) by simply pytest.warns().

When I remove None and run with pytest 7, I get failures:

image

No idea off-hand what's going on there, as that seems exactly what we did in #8677 too.

cc @Zac-HD @olgarithms

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: warningsrelated to the warnings builtin plugin

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions