summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Bernat <vincent@bernat.im>2018-07-31 08:41:55 +0200
committerIlya Etingof <etingof@gmail.com>2018-07-31 08:55:28 +0200
commit83a8ac9e3a417cbab8b122ab49c459228fce0c61 (patch)
tree9828c609eec795ef0a864de935b39222c5cb9574
parent5e13765c6e9a4fec4fc4010be0746fda951bc59b (diff)
downloadpysnmp-git-83a8ac9e3a417cbab8b122ab49c459228fce0c61.tar.gz
Ensure tests run through tox are using the expected Python executable (#175)
Otherwise, they are likely to use the system python.
-rwxr-xr-xruntests.sh6
-rw-r--r--tox.ini4
2 files changed, 6 insertions, 4 deletions
diff --git a/runtests.sh b/runtests.sh
index a435da6e..9143a769 100755
--- a/runtests.sh
+++ b/runtests.sh
@@ -2,6 +2,8 @@
set -e
+PYTHON=${1:-python}
+
for x in examples/hlapi/asyncore/sync/manager/cmdgen/*.py \
examples/hlapi/asyncore/sync/agent/ntforg/*.py \
examples/hlapi/asyncore/manager/cmdgen/*.py \
@@ -19,7 +21,7 @@ do
continue
;;
*)
- python "${x}" | tail -50
+ $PYTHON "${x}" | tail -50
;;
esac
-done \ No newline at end of file
+done
diff --git a/tox.ini b/tox.ini
index af983437..88539239 100644
--- a/tox.ini
+++ b/tox.ini
@@ -1,5 +1,5 @@
[envlist]
-envlist = py{26,27,33,34,35,36}
+envlist = py{26,27,33,34,35,36,37}
[testenv]
-commands = {toxinidir}/runtests.sh
+commands = {toxinidir}/runtests.sh {envpython}