Replies: 2 comments
|
Hey @ribbal, I understand the issue that you are running into. I suggest using a clean virtual environment for testing, or more simple: Use |
0 replies
|
Especially since we added tests for the example plugins ;) https://github.com/redimp/otterwiki/tree/main/docs/plugin_examples/tests |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
While developing the example
redlinksplugin, I noticed that installing it into the development environment changes the behavior of the core test suite.For example, after installing the plugin with:
the renderer test
fails because the plugin decorates the generated link by adding attributes such as
class="redlink"and inline styles. For example:The plugin is behaving as intended, but it means the outcome of the core test suite depends on which pluggy plugins are installed in the current Python environment.
Suggestion
It would be useful if the core test suite could disable pluggy plugin loading, or otherwise create an application/plugin manager that doesn't discover external plugins.
This would make the core tests deterministic and independent of the developer's environment. Plugin-specific tests could then explicitly register the plugins they need and verify their behavior in isolation.
Is there an existing mechanism to prevent plugin discovery during tests, or would it make sense to add one?
All reactions