forked from archlinux/archweb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
32 lines (23 loc) · 796 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
PYTHON>=python
PYTEST?=pytest
PYTEST_OPTIONS+=
PYTEST_INPUT?=.
PYTEST_COVERAGE_OPTIONS+=--cov-report=term-missing --cov-report=html:htmlcov --cov=.
PYTEST_PDB?=0
PYTEST_PDB_OPTIONS?=--pdb --pdbcls=IPython.terminal.debugger:TerminalPdb
ifeq (${PYTEST_PDB},1)
PYTEST_OPTIONS+= ${PYTEST_PDB_OPTIONS}
else
test-pdb: PYTEST_OPTIONS+= ${PYTEST_PDB_OPTIONS}
endif
test-pdb: test
.PHONY: test lint coverage
lint:
flake8 --extend-exclude "*/migrations/,local_settings.py" devel main mirrors news packages releng templates todolists visualize *.py
collectstatic:
python manage.py collectstatic --noinput
test: test-py
test-py coverage:
DJANGO_SETTINGS_MODULE=settings ${PYTEST} ${PYTEST_OPTIONS} ${PYTEST_COVERAGE_OPTIONS} ${PYTEST_INPUT}
open-coverage: coverage
${BROWSER} htmlcov/index.html