1. Doug Hellmann
  2. virtualenvwrapper

Commits

Aron Griffis  committed c680921

Enforce running run_tests under tox by setting/checking an env var

--HG--
extra : rebase_source : c7d4e82a995e79c35152190c2847aea53ee8e3cf

  • Participants
  • Parent commits 8ebd00f
  • Branches master

Comments (0)

Files changed (2)

File tests/run_tests

View file
 #!/bin/sh
 
-##
-## ONLY RUN THIS VIA TOX
-##
-
 #set -x
 
+if [ -z "$TOXIC" ]
+then
+    echo "Only run this via tox" 1>&2
+    exit 1
+fi
+
 envdir="$1"
 shift
 scripts="$*"

File tox.ini

View file
 [testenv]
 commands = bash ./tests/run_tests {envdir} []
 deps = virtualenv
+setenv =
+    TOXIC = true
 
 # Not sure why this is needed, but on my system if it isn't included then
 # the python version picked up for 2.6 is actually 2.7.