浏览代码

Added environment variable support to tox configuration

PYTHONPATH is required for passing through test modules that don't
already exist within the Django tests/ directory.

DISPLAY is required for testing selenium on systems that use Xvfb.

HOME is where the Vagrant djangobox stores geoip data, but it could be
useful for other tox commands that require access to data outside of
Django.
Josh Smeaton 8 年之前
父节点
当前提交
e59ba90c78
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      tox.ini

+ 3 - 1
tox.ini

@@ -20,7 +20,9 @@ basepython = python3
 
 [testenv]
 usedevelop = true
-passenv = DJANGO_SETTINGS_MODULE
+passenv = DJANGO_SETTINGS_MODULE PYTHONPATH HOME DISPLAY
+setenv =
+    PYTHONDONTWRITEBYTECODE=1
 deps =
     py{2,27}: -rtests/requirements/py2.txt
     py{3,34,35}: -rtests/requirements/py3.txt