summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-xtests/runtests.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/tests/runtests.py b/tests/runtests.py
index b604155190..6cf89c709e 100755
--- a/tests/runtests.py
+++ b/tests/runtests.py
@@ -12,16 +12,19 @@ from django.utils._os import upath
from django.utils import six
CONTRIB_MODULE_PATH = 'django.contrib'
+CONTRIB_GIS_TESTS_PATH = 'django.contrib.gis.tests'
TEST_TEMPLATE_DIR = 'templates'
RUNTESTS_DIR = os.path.abspath(os.path.dirname(upath(__file__)))
CONTRIB_DIR = os.path.dirname(upath(contrib.__file__))
+CONTRIB_GIS_TESTS_DIR = os.path.join(CONTRIB_DIR, 'gis', 'tests')
TEMP_DIR = tempfile.mkdtemp(prefix='django_')
os.environ['DJANGO_TEST_TEMP_DIR'] = TEMP_DIR
SUBDIRS_TO_SKIP = [
+ 'data',
'templates',
'test_discovery_sample',
'test_discovery_sample2',
@@ -52,7 +55,8 @@ def get_test_modules():
modules = []
for modpath, dirpath in (
(None, RUNTESTS_DIR),
- (CONTRIB_MODULE_PATH, CONTRIB_DIR)):
+ (CONTRIB_MODULE_PATH, CONTRIB_DIR),
+ (CONTRIB_GIS_TESTS_PATH, CONTRIB_GIS_TESTS_DIR)):
for f in os.listdir(dirpath):
if ('.' in f or
# Python 3 byte code dirs (PEP 3147)
@@ -64,6 +68,7 @@ def get_test_modules():
modules.append((modpath, f))
return modules
+
def get_installed():
from django.db.models.loading import get_apps
return [app.__name__.rsplit('.', 1)[0] for app in get_apps()]
@@ -125,14 +130,6 @@ def setup(verbosity, test_labels):
bits = bits[:1]
test_labels_set.add('.'.join(bits))
- # If GeoDjango, then we'll want to add in the test applications
- # that are a part of its test suite.
- from django.contrib.gis.tests.utils import HAS_SPATIAL_DB
- if HAS_SPATIAL_DB:
- from django.contrib.gis.tests import geo_apps
- test_modules.extend(geo_apps())
- settings.INSTALLED_APPS.extend(['django.contrib.gis', 'django.contrib.sitemaps'])
-
for modpath, module_name in test_modules:
if modpath:
module_label = '.'.join([modpath, module_name])