This project uses pytest
and pytest-snapshot
to define and run tests.
You can install these dependencies by running:
pip install -r tests/requirements.txt
Then, make sure pytest
is installed and in your $PATH
by running:
pytest --version
Ensure that the command returns some version greater than 7.
You can execute all tests in the tests
directory by running:
pytest tests
To execute a specific test file, you can run:
pytest <file>
Further, to execute a specific test function within a particular test file, you can run ...
pytest <file>::test_<function_name>
We use snapshot testing to ensure the ASTs do not suffer from regressions. When needed, you can regenerate the snapshots using:
pytest --snapshot-update
Ensure that the resulting snapshots make sense before commiting them.