6.3. Tests

6.3.1. Doctests

$ python3 -m doctest -v tests/*.py

6.3.2. Unit Tests

$ python3 -m unittest discover -v tests

6.3.3. Test Coverage

$ python3 -m coverage run game
$ python3 -m coverage xml -o .tmp/coverage.xml

6.3.4. Security Analysis

$ python3 -m bandit --format json --output=.tmp/bandit.json --recursive game

6.3.5. Types

$ python3 -m mypy --ignore-missing-imports game

6.3.6. Style

$ python3 -m flake8 --doctest --output-file=.tmp/flake8.txt

6.3.7. Lint

$ python3 -m pylint --output-format=parseable --output=.tmp/pylint.txt --disable=C0114,C0115,C0116,E0401,C0103 game
  • C0114 - missing-module-docstring

  • C0115 - missing-class-docstring

  • C0116 - missing-function-docstring

  • E0401 - import-error

  • C0103 - invalid-name (errors on x and y attribute names)