Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fixed error when trying to import the GEOS tests from their new locat…


git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent fd46f67 commit 91ebe9acaebff65cdf2b8bab0828bb9badff5179 @jbronn jbronn committed
Showing with 7 additions and 12 deletions.
  1. +7 −12 django/contrib/gis/tests/
19 django/contrib/gis/tests/
@@ -204,21 +204,16 @@ def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=[], suite=
# Class for creating a fake module with a run method. This is for the
# GEOS and GDAL tests that were moved to their respective modules.
class _DeprecatedTestModule(object):
- def __init__(self, tests, mod):
- self.tests = tests
- self.mod = mod
+ def __init__(self, mod_name):
+ self.mod_name = mod_name
def run(self):
from warnings import warn
warn('This test module is deprecated because it has moved to ' \
'`django.contrib.gis.%s.tests` and will disappear in 1.2.' %
- self.mod, DeprecationWarning)
+ self.mod_name, DeprecationWarning)
+ tests = import_module('django.contrib.gis.%s.tests' % self.mod_name)
-from django.contrib.gis.geos import tests as _tests
-test_geos = _DeprecatedTestModule(_tests, 'geos')
-from django.contrib.gis.gdal import HAS_GDAL
- from django.contrib.gis.gdal import tests as _tests
- test_gdal = _DeprecatedTestModule(_tests, 'gdal')
+test_geos = _DeprecatedTestModule('geos')
+test_gdal = _DeprecatedTestModule('gdal')

0 comments on commit 91ebe9a

Please sign in to comment.
Something went wrong with that request. Please try again.