File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 - /tmp/venv/openfisca_core
3131
3232 - run :
33- name : Run Core tests
34- command : env PYTEST_ADDOPTS ="--exitfirst" make test
33+ name : Run tests
34+ command : make test pytest_addopts ="--cov=openfisca_core -- exitfirst"
3535
3636 - run :
3737 name : Check NumPy typing against latest 3 minor versions
4242 paths :
4343 - .coverage
4444
45- - run :
46- name : Run Country Template tests
47- command : |
48- COUNTRY_TEMPLATE_PATH=`python -c "import openfisca_country_template; print(openfisca_country_template.CountryTaxBenefitSystem().get_package_metadata()['location'])"`
49- openfisca test $COUNTRY_TEMPLATE_PATH/openfisca_country_template/tests/
50-
5145 check_version :
5246 docker :
5347 - image : python:3.7
Original file line number Diff line number Diff line change 1+ COUNTRY_TEMPLATE := openfisca_country_template
2+ EXTENSION_TEMPLATE := openfisca_extension_template
3+ PYTHON_PACKAGES_PATH := $(shell python -c "import sysconfig; print(sysconfig.get_paths() [\"purelib\"])")
4+ COUNTRY_TEMPLATE_TESTS := ${PYTHON_PACKAGES_PATH}/${COUNTRY_TEMPLATE}/tests
5+ EXTENSION_TEMPLATE_TESTS := ${PYTHON_PACKAGES_PATH}/${EXTENSION_TEMPLATE}/tests
6+
17all : test
28
39uninstall :
@@ -9,7 +15,7 @@ install:
915
1016clean :
1117 rm -rf build dist
12- find . -name ' *.pyc' -exec rm \{\} \;
18+ find . -name " *.pyc" -exec rm \{\} \;
1319
1420check-syntax-errors :
1521 python -m compileall -q .
@@ -28,7 +34,9 @@ format-style:
2834 autopep8 ` git ls-files | grep " \.py$$ " `
2935
3036test : clean check-syntax-errors check-style check-types
31- env PYTEST_ADDOPTS=" $$ PYTEST_ADDOPTS --cov=openfisca_core" pytest
37+ PYTEST_ADDOPTS=" $$ PYTEST_ADDOPTS ${pytest_addopts} " pytest
38+ openfisca test ${COUNTRY_TEMPLATE_TESTS} -c ${COUNTRY_TEMPLATE} ${optional_arguments}
39+ openfisca test ${EXTENSION_TEMPLATE_TESTS} -c ${COUNTRY_TEMPLATE} -e ${EXTENSION_TEMPLATE} ${optional_arguments}
3240
33- api :
34- openfisca serve --country-package openfisca_country_template --extensions openfisca_extension_template
41+ serve :
42+ openfisca serve -c ${COUNTRY_TEMPLATE} -e ${EXTENSION_TEMPLATE} ${optional_arguments}
You can’t perform that action at this time.
0 commit comments