tox: also run tests against python 3
This commit is contained in:
parent
8252e948e7
commit
250476911c
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Get venv site-packages path
|
||||||
|
DSTDIR=`python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||||
|
|
||||||
|
# Get not venv site-packages path
|
||||||
|
# Remove first path (assuming that is the venv path)
|
||||||
|
NONPATH=`echo $PATH | sed 's/^[^:]*://'`
|
||||||
|
SRCDIR=`PATH=$NONPATH python3 -c 'from distutils.sysconfig import get_python_lib; print(get_python_lib())'`
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
rm -f $DSTDIR/lasso.*
|
||||||
|
rm -f $DSTDIR/_lasso.*
|
||||||
|
|
||||||
|
# Link
|
||||||
|
ln -sv /usr/lib/python3/dist-packages/lasso.py $DSTDIR/
|
||||||
|
ln -sv /usr/lib/python3/dist-packages/_lasso.cpython-36m-x86_64-linux-gnu.so $DSTDIR/
|
||||||
|
|
||||||
|
exit 0
|
6
tox.ini
6
tox.ini
|
@ -1,5 +1,5 @@
|
||||||
[tox]
|
[tox]
|
||||||
envlist = {coverage-,}{dj18,dj111}-{pg,sqlite}
|
envlist = {coverage-,}py2-{dj18,dj111}-{pg,sqlite},py3-dj111-{pg,sqlite}
|
||||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/django-mellon/
|
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/django-mellon/
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
@ -18,6 +18,7 @@ deps =
|
||||||
dj18: django>1.8,<1.9
|
dj18: django>1.8,<1.9
|
||||||
dj111: django>1.11,<1.12
|
dj111: django>1.11,<1.12
|
||||||
pg: psycopg2
|
pg: psycopg2
|
||||||
|
mock
|
||||||
httmock
|
httmock
|
||||||
pytest
|
pytest
|
||||||
pytest-cov
|
pytest-cov
|
||||||
|
@ -31,6 +32,7 @@ deps =
|
||||||
WebTest
|
WebTest
|
||||||
pyquery
|
pyquery
|
||||||
commands =
|
commands =
|
||||||
./getlasso.sh
|
py2: ./getlasso.sh
|
||||||
|
py3: ./getlasso3.sh
|
||||||
py.test --random {env:COVERAGE:} {posargs:tests}
|
py.test --random {env:COVERAGE:} {posargs:tests}
|
||||||
coverage: mv coverage.xml coverage-{envname}.xml
|
coverage: mv coverage.xml coverage-{envname}.xml
|
||||||
|
|
Loading…
Reference in New Issue