File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2424
2525# # Upload openfisca-core package to PyPi.
2626publish :
27+ @$(call print_help,$@ :)
2728 @twine upload dist/* --username $$ {PYPI_USERNAME} --password $$ {PYPI_PASSWORD}
29+ @$(call print_pass,$@ :)
Original file line number Diff line number Diff line change 1+ # # The path to the installed packages.
2+ python_packages = $(shell python -c "import sysconfig; print(sysconfig.get_paths() [\"purelib\"])")
3+
14# # Run openfisca-core.
25test-code : test-core
36 @# # Usage:
@@ -13,9 +16,24 @@ test-code: test-core
1316 @$(call print_pass,$@ :)
1417
1518# # Run openfisca-core tests.
16- test-core : $(shell git ls-files "tests/* .py")
19+ test-core :
20+ @$(call print_help,$@ :)
21+ @PYTEST_ADDOPTS=" \
22+ ${PYTEST_ADDOPTS} \
23+ --cov=src \
24+ ${pytest_args} \
25+ " \
26+ openfisca test $(shell find tests -name "* .py") ${openfisca_args}
27+ @$(call print_pass,$@ :)
28+
29+ # # Run openfisca-core tests against the built version.
30+ test-built :
1731 @$(call print_help,$@ :)
18- @PYTEST_ADDOPTS=" ${PYTEST_ADDOPTS} --cov=src ${pytest_args} " \
19- openfisca test $? \
20- ${openfisca_args}
32+ @PYTEST_ADDOPTS=" \
33+ ${PYTEST_ADDOPTS} \
34+ --cov=${python_packages} /openfisca_core \
35+ --cov=${python_packages} /openfisca_web_api \
36+ ${pytest_args} \
37+ " \
38+ openfisca test $(shell find tests -name "* .py") ${openfisca_args}
2139 @$(call print_pass,$@ :)
You can’t perform that action at this time.
0 commit comments