sap218 / jabberwocky

NLP toolkit for those nonsensical ontologies
https://sap218.github.io/jabberwocky/
MIT License
16 stars 1 forks source link

feat(tests): test SCENARIO.md #13

Closed majensen closed 4 years ago

majensen commented 4 years ago

This patch adds a simple pytest suite in the new dir 'tests'. It uses the handy "CliRunner" in the click.testing package to run each command as it would be run on the command line.

The tests simply assert that each command succeeds.

Added a tox.ini, so you can use 'tox' (pip install tox) to build and run in fresh virtual environment in one command (the command is ... wait for it ... tox).

majensen commented 4 years ago

Another slightly fancy thing this does is add sap218/jabberwocky-tests as a submodule to jabberwocky proper (in the tests directory), so the test uses the actual sample files that are provided there. That is, this commit doesn't copy those files and so create artifacts that will go stale. If you make updates to jabberwocky-tests, you can git-pull those updates into the submodule here, update the tests, etc.

sap218 commented 4 years ago

Thank you very much!