Pytest and flake8
import sys
def add(a):
return a
def add(x, y):
z = 42
sum = x+y
return sum
print = 42
import mymod
def test_add():
assert mymod.add(2, 3) == 5
{% embed include file="src/examples/pytest/flake/.flake8)
pip install flake8
pip install pytest-flake8
pip install flake8-builtins
flake8
rm -rf .pytest_cache/
pytest --flake8