Skip to content

deprecate: warn when passing None to PluginManager.register() - #847

Closed
EnesKartal wants to merge 1 commit into
pytest-dev:mainfrom
EnesKartal:deprecate/register-none
Closed

EnesKartal wants to merge 1 commit into
pytest-dev:mainfrom
EnesKartal:deprecate/register-none

Conversation

@EnesKartal

Copy link
Copy Markdown

Summary

  • Emit a DeprecationWarning in PluginManager.register() when plugin is None instead of silently ignoring it.
  • Update test_register_ignores_none and test_load_setuptools_ignores_declined_plugins to assert the deprecation warning.

Test Plan

  • .venv\Scripts\python.exe -m pytest -q --basetemp=.pytest-tmp -> 226 passed in 0.21s.

Fixes #790

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

deprecate passing None as a plugin instance

2 participants