Skip to content

pytest should be overriding the interpreter's default warnings filter #2908

@ncoghlan

Description

@ncoghlan

When DeprecationWarning was hidden by default, the expectation was that 3rd party test runners would follow the unittest module's lead and re-enable them when running tests (see https://docs.python.org/3/whatsnew/2.7.html#changes-to-the-handling-of-deprecation-warnings and and https://docs.python.org/3/library/unittest.html#unittest.TextTestRunner)

This currently isn't the case for pytest - it requires developers to explicitly opt-in to seeing deprecation warnings, rather than requiring them to opt-out the way unittest does.

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: warningsrelated to the warnings builtin plugintype: proposalproposal for a new feature, often to gather opinions or design the API around the new feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions