Skip to content

test: cover pluggy.__version__ getattr and HookCaller._remove_plugin … - #718

Open
darrenhuai wants to merge 1 commit into
pytest-dev:mainfrom
darrenhuai:test/cover-version-getattr-and-remove-plugin
Open

test: cover pluggy.__version__ getattr and HookCaller._remove_plugin …#718
darrenhuai wants to merge 1 commit into
pytest-dev:mainfrom
darrenhuai:test/cover-version-getattr-and-remove-plugin

Conversation

@darrenhuai

Copy link
Copy Markdown

…not-found path

Ran the suite under coverage.py and found two real gaps in otherwise near-100% covered code. The module-level getattr that lazily resolves pluggy.version via importlib.metadata (added per changelog/590.trivial.rst) had no test exercising either branch. And HookCaller._remove_plugin's ValueError, raised when asked to remove a plugin that never registered on that hook, was untested even though the normal removal path is well covered through
PluginManager.unregister.

…not-found path

Ran the suite under coverage.py and found two real gaps in otherwise
near-100% covered code. The module-level __getattr__ that lazily
resolves pluggy.__version__ via importlib.metadata (added per
changelog/590.trivial.rst) had no test exercising either branch. And
HookCaller._remove_plugin's ValueError, raised when asked to remove a
plugin that never registered on that hook, was untested even though
the normal removal path is well covered through
PluginManager.unregister.
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.

1 participant