Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add unit tests for PluginRequirements #71

Open
eileen-kuehn opened this issue Feb 26, 2020 · 1 comment
Open

Add unit tests for PluginRequirements #71

eileen-kuehn opened this issue Feb 26, 2020 · 1 comment

Comments

@eileen-kuehn
Copy link
Member

The current implementation of PluginRequirements does not come with any unit tests yet. Those should be added.

@maxfischer2781
Copy link
Member

I'm a bit unsure how to best test this, so looking for input. It's important and fragile enough that coverage is desirable.

The problem is that plugins are handled via entry points, which AFAIK strictly require installing. We cannot really monkey-patch them, as we do for other resources.

Currently, I see two possible approaches:

  • Install some "test plugins" as part of cobald itself. We can probably name-mangle them so no-one accidentally uses them, but they would still be there.
    • Alternatively, have a dedicated test package containing the plugins.
  • Modify the plugin loading to separate reading and processing. This is the most unittest'ish approach, but complicates plugin loading.

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

No branches or pull requests

2 participants