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

Create special pytest fixtures to facilitate component-specific testing of lifecycle functions #103

Open
breezykermo opened this issue Aug 6, 2019 · 0 comments
Assignees
Labels
build Associated with testing, CI, and/or QA release Currently in progress for next release

Comments

@breezykermo
Copy link
Member

It would be great to be able to be able to test analysers (and maybe selectors as well) by running them singularly on test elements.

These could be made available as pytest fixtures, being setup in src/conftest.py. Ideally, what would be passed as a fixture would be something like higher level function: get_analyse_element, to which could be passed the class for the analyser that is being tested. Using the get_etype static methods, the fixture could work out what kind of element should work with the analyser.

After calling get_analyse_element, the returned object could have some kind of preloaded test_analyse_element attribute, which would run the module's analyse_element for a range of input elements, checking that appropriate errors are thrown in the case of incompatible input elements, and verifying things on the output elements in some way.

@breezykermo breezykermo added help wanted Open for community contribution! Be sure to comment on the issue to check status build Associated with testing, CI, and/or QA labels Aug 6, 2019
@breezykermo breezykermo added release Currently in progress for next release and removed help wanted Open for community contribution! Be sure to comment on the issue to check status labels Nov 25, 2020
@breezykermo breezykermo self-assigned this Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Associated with testing, CI, and/or QA release Currently in progress for next release
Projects
None yet
Development

No branches or pull requests

1 participant