Útiles QA

Análisis de convención de código pep8

Análisis sintáctico: flake8 y pylint

Documentación: pydoc y sphinx

Debuggers: pdb, PuDB y PyCharm

Testing: doctest, unittest y py.test

doctest

def sum(a, b):
    """Sum two numbers.

    >>> 1 + 3
    4
    """
    return a + b

pytest

$ pip install pytest
$ py.test --doctest-modules inventory.py

coverage

$ pip install pytest-cov
$ py.test --cov . --cov-report html
...
if debug:  # pragma: no cover
    print('...')