Skip to content
Enric Ribera Borrell edited this page Apr 15, 2021 · 10 revisions

Documentation

To run tests

# install pytest
pip install pytest

# load test data
pip install pytest-datadir

Useful commands

# run all tests
pytest

# run all tests + set state space dimension
pytest --dim-state-space 1000

# run all tests and set period length with
pytest --period-length 5

# run tests and set length of finite-time interval
pytest ----interval-length 5

# run all tests from test_stationary.py module
pytest tests/test_stationary.py

# run a specific test from the test_stationary.py module
pytest tests/test_stationary.py::TestStationary::test_current

# to test against the small network example
pytest --small-network

# print test executing times
pytest --durations=0

# print stdout in tests (disable all capturing)
pytest -s
Clone this wiki locally