[Python-modules-team] Bug#859916: Fails on simple test from documentation
Chris Lamb
lamby at debian.org
Sat Apr 15 15:58:15 UTC 2017
tags 859916 + patch
retitle 859916 django-assets: installed pytest plugin can break unrelated software
thanks
Patch attached.
Regards,
--
,''`.
: :' : Chris Lamb
`. `'` lamby at debian.org / chris-lamb.co.uk
`-
-------------- next part --------------
diff --git a/django_assets/pytest_plugin.py b/django_assets/pytest_plugin.py
index 7736a6f..847f357 100644
--- a/django_assets/pytest_plugin.py
+++ b/django_assets/pytest_plugin.py
@@ -1,6 +1,8 @@
+import os
import pytest
import django_assets.env
@pytest.fixture(autouse=True)
def set_django_assets_env():
- django_assets.env.get_env() # initialise django-assets settings
+ if 'DJANGO_SETTINGS_MODULE' in os.environ:
+ django_assets.env.get_env() # initialise django-assets settings
More information about the Python-modules-team
mailing list