mirror of
https://github.com/TECHNOFAB11/bumpver.git
synced 2025-12-12 14:30:09 +01:00
py27 compat fixes
This commit is contained in:
parent
2017a773b6
commit
00fdabed32
7 changed files with 43 additions and 7 deletions
|
|
@ -7,3 +7,30 @@
|
|||
serve:
|
||||
echo "Not Implemented"
|
||||
|
||||
|
||||
COMPAT_TEST_FILES = $(shell ls -1 test/*.py | awk '{ printf " compat_"$$0 }')
|
||||
|
||||
compat_test/%.py: test/%.py
|
||||
@mkdir -p compat_test/;
|
||||
$(DEV_ENV)/bin/lib3to6 $< > $@.tmp;
|
||||
mv $@.tmp $@;
|
||||
|
||||
|
||||
## Run pytest integration tests
|
||||
.PHONY: test_compat
|
||||
test_compat: $(COMPAT_TEST_FILES)
|
||||
rm -rf compat_test/fixtures;
|
||||
mkdir -p compat_test/fixtures;
|
||||
cp -R test/fixtures compat_test/
|
||||
|
||||
# install the package and run the test suite against it.
|
||||
mkdir -p build/test_wheel;
|
||||
$(DEV_ENV_PY) setup.py bdist_wheel --dist-dir build/test_wheel;
|
||||
|
||||
IFS=' ' read -r -a env_paths <<< "$(CONDA_ENV_PATHS)"; \
|
||||
for i in $${!env_paths[@]}; do \
|
||||
env_py=$${env_paths[i]}/bin/python; \
|
||||
$${env_py} -m pip install --upgrade build/test_wheel/*.whl; \
|
||||
PYTHONPATH="" ENV=$${ENV-dev} \
|
||||
$${env_py} -m pytest --verbose compat_test/; \
|
||||
done;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue