File tree 5 files changed +39
-3
lines changed
5 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 7
7
**/tests/*.py
8
8
env*
9
9
settings.py
10
+ conftest.py
10
11
local_settings.py
11
12
/home/travis/virtualenv*
Original file line number Diff line number Diff line change 18
18
19
19
# coverage
20
20
.coverage
21
+ htmlcov
Original file line number Diff line number Diff line change @@ -6,9 +6,9 @@ cache: pip
6
6
install : " pip install -r requirements.txt && pip install coveralls pylint"
7
7
8
8
script :
9
- - python manage.py collectstatic --noinput
10
- - coverage run --rcfile .coveragerc manage.py test
11
- - pylint devel main mirrors news packages releng templates todolists visualize *.py
9
+ - make collectstatic
10
+ - make lint
11
+ - make coverage
12
12
13
13
after_success :
14
14
- coveralls
Original file line number Diff line number Diff line change
1
+ PYTHON> =python
2
+ PYTEST? =pytest
3
+ PYTEST_OPTIONS+ =
4
+ PYTEST_INPUT? =.
5
+ PYTEST_COVERAGE_OPTIONS+=--cov-report =term-missing --cov-report=html:htmlcov --cov=.
6
+ PYTEST_PDB? =0
7
+ PYTEST_PDB_OPTIONS? =--pdb --pdbcls=IPython.terminal.debugger:TerminalPdb
8
+
9
+
10
+ ifeq (${PYTEST_PDB},1)
11
+ PYTEST_OPTIONS+ = ${PYTEST_PDB_OPTIONS}
12
+ else
13
+ test-pdb : PYTEST_OPTIONS+= ${PYTEST_PDB_OPTIONS}
14
+ endif
15
+ test-pdb : test
16
+
17
+
18
+ .PHONY : test lint
19
+
20
+ lint :
21
+ pylint devel main mirrors news packages releng templates todolists visualize * .py
22
+
23
+ collecstatic :
24
+ python manage.py collecstatic --noinput
25
+
26
+ test : test-py
27
+
28
+ test-py coverage :
29
+ ${PYTEST} ${PYTEST_INPUT} ${PYTEST_OPTIONS} ${PYTEST_COVERAGE_OPTIONS}
30
+
31
+ open-coverage : coverage
32
+ ${BROWSER} htmlcov/index.html
Original file line number Diff line number Diff line change
1
+ [pytest]
2
+ DJANGO_SETTINGS_MODULE = settings
You can’t perform that action at this time.
0 commit comments