ward
ward copied to clipboard
Display which plugins have been discovered/loaded
In the SessionPrelude
(the bit of text that prints out at the top of every test session) we should display the names of the plugins that have been discovered (Ward automatically discovers plugins after they've been e.g. pip install
ed).
Here's how you'd get the list of plugins: https://pluggy.readthedocs.io/en/latest/api_reference.html#pluggy.PluginManager.
The PluginManager inside Ward can be found in hooks.py
.
Here's the relevant bit of code that prints out the prelude: https://github.com/darrenburns/ward/blob/master/ward/_terminal.py#L458
Ideally, the list of plugins discovered will appear on the line above the "Loaded config from pyproject.toml".
Hi! Can I work on this issue?
Hi @drunkeninja42, yeah feel free to pick it up if you'd like to 🙂
Hello @darrenburns , can i create a pull request to add this feature? if this issue still relevant.
I want to add code something like this to SessionPrelude class:
list_of_plugins: List = plugins.list_name_plugin()
if list_of_plugins:
yield f"The list of plugins discovered: {[name for name, plugin in list_of_plugins]}"
Yes 🙂