summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2018-03-27 06:59:04 (GMT)
committerFrédéric Péters <fpeters@entrouvert.com>2018-04-05 12:38:49 (GMT)
commit250476911c0ac1519c6a457ac973b5f91f947817 (patch)
tree39ea5457fd878ba57b0bc4ea85105da0fc170104
parent8252e948e7a9e4f487f1049fd28d5ef3f938486b (diff)
downloaddjango-mellon-250476911c0ac1519c6a457ac973b5f91f947817.zip
django-mellon-250476911c0ac1519c6a457ac973b5f91f947817.tar.gz
django-mellon-250476911c0ac1519c6a457ac973b5f91f947817.tar.bz2
tox: also run tests against python 3
-rwxr-xr-xgetlasso3.sh19
-rw-r--r--tox.ini6
2 files changed, 23 insertions, 2 deletions
diff --git a/getlasso3.sh b/getlasso3.sh
new file mode 100755
index 0000000..20fabb2
--- /dev/null
+++ b/getlasso3.sh
@@ -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
diff --git a/tox.ini b/tox.ini
index e0f3da6..fb50fac 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[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/
[testenv]
@@ -18,6 +18,7 @@ deps =
dj18: django>1.8,<1.9
dj111: django>1.11,<1.12
pg: psycopg2
+ mock
httmock
pytest
pytest-cov
@@ -31,6 +32,7 @@ deps =
WebTest
pyquery
commands =
- ./getlasso.sh
+ py2: ./getlasso.sh
+ py3: ./getlasso3.sh
py.test --random {env:COVERAGE:} {posargs:tests}
coverage: mv coverage.xml coverage-{envname}.xml