pytest-santa is a plugin that collects function argument types using MonkeyType and then generates test data by Hypothesis.
- If needed, install and upgrade the
pipenv
command:pip install pipenv --user
- Install the development dependencies
pipenv
command:pipenv install --dev
- To run test for the
src
:pipenv run pytest tests
- To run test for the example:
pipenv run pytest example/tests
To create traceback database with monkeytype first you need to be in the example
directory by using: cd example
Then run the following:
pipenv run monkeytype run termfrequency/runtermfreq.py inputs/input.txt
Optional commands to apply the types to the code:
pipenv run monkeytype stub termfrequency.tf_objectoriented
pipenv run monkeytype apply termfrequency.tf_objectoriented
To learn more about MonkeyType please go to MonkeyType via this link.