diff options
Diffstat (limited to 'tests/test_apps/reloader_app.py')
| -rw-r--r-- | tests/test_apps/reloader_app.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/test_apps/reloader_app.py b/tests/test_apps/reloader_app.py index 531b359f..da404dc5 100644 --- a/tests/test_apps/reloader_app.py +++ b/tests/test_apps/reloader_app.py @@ -1,3 +1,4 @@ +import os import sys from werkzeug import _reloader @@ -6,9 +7,10 @@ from werkzeug.wrappers import Response # Tox puts the tmp dir in the venv sys.prefix, patch the reloader so # it doesn't skip real_app. -prefixes = set(_reloader._ignore_prefixes) -prefixes -= {p for p in (sys.prefix, sys.exec_prefix) if "/.tox/" in p} -_reloader._ignore_prefixes = tuple(prefixes) +if "TOX_ENV_DIR" in os.environ: + _reloader._ignore_prefixes = tuple( + set(_reloader._ignore_prefixes) - {sys.prefix, sys.exec_prefix} + ) @Request.application |
