You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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
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
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 theget_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 preloadedtest_analyse_element
attribute, which would run the module'sanalyse_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.The text was updated successfully, but these errors were encountered: