If you repeat lots of bash commands while developing then makefiles can help you out.
You may need to install some dependencies, this is done via;
pip install pytest flake8
There's a few files we use. They are shown below.
test: pytest tests.py clean: rm -rf __pycache__ .pytest_cache
Note when you copy the above file; the indentation
must be a tab in a
Makefile. What you copy may contain spaces instead.
def add(n1, n2): return n1 + n2
from common import add def test_add(): assert add(1, 1) == 2
Feedback? See an issue? Something unclear? Feel free to mention it here.
If you want to be kept up to date, consider getting the newsletter.