Skip to content

Running Tests

Always have the --keepdb option in PyCharm

  • In PyCharm click the green triangle beside a test

Running tests in terminal

python test --keepdb
  • -k flag: match test name patterns
python test -k match.pattern1 -k match.pattern2

Code coverage

pip install coverage

# replace `python` with `coverage run`
coverage run --branch test
coverage html

Last update: 2023-04-24