forked from hhatto/autopep8
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
56 lines (47 loc) · 1.3 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
all:
@echo "make test(test_basic, test_diff, test_unit)"
@echo "make pypireg"
@echo "make coverage"
@echo "make check"
@echo "make clean"
TEST_DIR=test
.PHONY: test test_basic test_diff test_unit
test: test_basic test_diff test_unit
test_basic:
@echo '---> Running basic test'
python autopep8.py test_target.py > .tmp.test.py
pep8 -r .tmp.test.py && echo 'OK'
@rm .tmp.test.py
test_diff:
@echo '---> Running --diff test'
@cp test_target.py .tmp.test_target.py
python autopep8.py --diff .tmp.test_target.py > .tmp.test_target.py.patch
patch < .tmp.test_target.py.patch
@rm .tmp.test_target.py.patch
pep8 -r .tmp.test_target.py && echo 'OK'
@rm .tmp.test_target.py
test_unit:
@echo '---> Running unit tests'
python test/test_autopep8.py
coverage:
@rm -rf htmlcov
@PATH=test/coverage_python:${PATH} python test/test_autopep8.py
@coverage combine
@coverage report
@coverage html
@echo 'Coverage report: htmlcov/index.html'
@rm .coverage
check:
pep8 autopep8.py && echo 'OK'
pylint --reports=no --include-ids=yes \
--disable=C0111,C0103,R0902,W0511,R0914,R0912,R0915,R0904,R0911 \
--rcfile=/dev/null autopep8.py && echo 'OK'
pypireg:
python setup.py register
python setup.py sdist upload
clean:
rm -rf .tmp.test.py
rm -rf temp
rm -rf *.pyc
rm -rf *egg-info dist build
rm -rf htmlcov