FastF1 uses the pytest framework.
The tests are in
fastf1/tests, and customizations to the pytest
testing infrastructure are in
To run the tests you will need to set up FastF1 for development. Note in particular the additional dependencies for testing.
Running the tests¶
In the root directory of your development repository run:
python -m pytest
pytest can be configured via a lot of command-line parameters. Some particularly useful ones are:
Be more verbose
Run tests in parallel over NUM processes (requires pytest-xdist)
Do not capture stdout
To run a single test from the command line, you can provide a file path, optionally followed by the function separated by two colons, e.g., (tests do not need to be installed, but FastF1 should be):