-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (45 loc) · 1.37 KB
/
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# You can set these variables from the command line.
DIRNAME_HTML_REPORT = coveragereport
.PHONY: help all clean test html
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " setup to install dependencies"
@echo " test to execute the PyTest tests"
@echo " coverage to measure, collect, and report on code coverage in Python programs"
@echo " html_report to make standalone HTML files of the coverage test documentation"
all: setup test coverage html_report
########################################################################
## Install dependencies
setup:
pip install --timeout 120 -r requirements-dev.txt
pip install --timeout 120 .
@echo
@echo "The dependencies are installed."
@echo
########################################################################
## Tests
test: clean
flake8 --statistics
pytest --flakes
pytest --cov=pyve
@echo
@echo "The PyTest tests are executed."
@echo
########################################################################
## Coverage
clean:
rm -rf $(DIRNAME_HTML_REPORT)/
coverage3 erase
@echo
@echo "The coverage data are erased."
@echo
coverage:
coverage3 run -m py.test tests/test_pyve.py
@echo
@echo "The coverage test report are finished."
@echo
html_report:
coverage3 html pyve.py
@echo
@echo "HTML report are done in $(DIRNAME_HTML_REPORT)/index.html."
@echo