-
Notifications
You must be signed in to change notification settings - Fork 2
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
Pytest Plugin #41
Pytest Plugin #41
Conversation
* Set up the project to be used as a pytest plugin. * Created the `snappiershot.plugins.tracker.Tracker` object for tracking the status of snapshots throughout an entire run. Other Notes: * Updated the config object, removing the "significant figures" configuration and adding a "full diff" configuration. * Removed the pytest-cov dependency. Unfortunately if does not work well with testing coverage of pytest coverage. More information can be found here: https://pytest-cov.readthedocs.io/en/latest/plugins.html * Created the run_tests.sh bash script for running tests.
float_absolute_tolerance = 1e-6 | ||
float_relative_tolerance = 0.001 | ||
full_diff = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps a more clear variable name show_full_diff
? also its a bit unclear what a non-full diff implies... Should be more clear/verbose about this throughout
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps out of scope, but may want to consider for later: do we want levels of verbosity? (rather than binary)
@@ -0,0 +1,69 @@ | |||
""" Tests for snappiershot/plugins/pytest.py """ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah yes the wonderful meta testing :)
Update the README to include a pytest usage example |
This PR sets up the repository to be used as a
pytest
plugin. This includes the following:snappiershot/plugins/pytest.py
.pytest11
plugin within thepyproject.toml
file.pytester
plugin andtester
fixture to test the plugin. More information can be found hereIn addition, the following objects and functionality was added:
snappiershot.plugins.tracker.Tracker
objectfor tracking the status of snapshots throughout an entire run.
snappiershot.snapshot.SnapshotStatus
enum.configuration and adding a "full diff" configuration.
Finally, the following infrastructure change occurred:
well with testing coverage of pytest coverage. More information can
be found here
Closes #26