-
Notifications
You must be signed in to change notification settings - Fork 7
Testing
jfuruness edited this page Sep 11, 2024
·
4 revisions
This repository uses a variety of linters and pytest for it's testing. It also uses github action and tox. If you'd like to run these individually, locally, you can run:
cd bgpy
ruff check bgpy # syntax checker
ruff format bgpy # autoformatter
mypy bgpy # type checker
pytest bgpy # Runs through all the tests
If you want to run the automated tests locally:
cd bgpy
tox --skip-missing-interpreters
Otherwise, whenever you push your code, github actions will automatically run all linters and tests in github.
Additionally, if you want to view the diagrams from the system test suite, when you run your system tests you can run them with a --view argument. For example:
cd bgpy
pytest bgpy --view
If you have just written a new system test, and want to write the results without verifying, use the --overwrite flag. This is often used to write results before verifying, and then verifying afterwards, which is much faster than writing them out by hand.
cd bgpy
pytest bgpy --overwrite