diff --git a/plugins/org.python.pydev.core/pysrc/_pydev_runfiles/pydev_runfiles.py b/plugins/org.python.pydev.core/pysrc/_pydev_runfiles/pydev_runfiles.py index 2137efb9da..ca786c376b 100644 --- a/plugins/org.python.pydev.core/pysrc/_pydev_runfiles/pydev_runfiles.py +++ b/plugins/org.python.pydev.core/pysrc/_pydev_runfiles/pydev_runfiles.py @@ -748,6 +748,11 @@ def run_tests(self, handle_coverage=True): sys.stdout.write("done.\n") sys.stdout.write("Importing test modules ... ") + if self.configuration.django: + import django + if hasattr(django, 'setup'): + django.setup() + if handle_coverage: coverage_files, coverage = start_coverage_support(self.configuration)