5.4. Tests

5.4.1. Doctests

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

5.4.2. Unit Tests

$ python3 -m unittest discover -v tests

5.4.3. Test Coverage

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

5.4.4. Security Analysis

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

5.4.5. Types

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

5.4.6. Style

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

5.4.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)