Pytest and flake8



examples/pytest/flake/mymod.py
import sys

def add(a):
    return a

def add(x, y):
   z = 42
   sum = x+y
   return sum

print = 42

examples/pytest/flake/test_mymod.py
import mymod

def test_add():
    assert mymod.add(2, 3) == 5

examples/pytest/flake/.flake8
[flake8]
ignore =
#ignore = F401 E302 E111 F841 E111 E226 E111 W391
#exclude = test_mymod.py



pip install flake8
pip install pytest-flake8
pip install flake8-builtins

flake8
rm -rf .pytest_cache/
pytest --flake8