Fixed conditional skipping of test for left/right lookup types.

connection.ops.spatial_version is None for some backends (eg. MySQL) and
the comparison fails on Python 3 with TypeError.
This commit is contained in:
Aymeric Augustin 2013-05-09 17:38:47 +02:00
parent a53d7a0a50
commit 1906cb9360
1 changed files with 1 additions and 1 deletions

View File

@ -297,7 +297,7 @@ class GeoLookupTest(TestCase):
# The left/right lookup tests are known failures on PostGIS 2.0/2.0.1
# http://trac.osgeo.org/postgis/ticket/2035
if (2, 0, 0) <= connection.ops.spatial_version <= (2, 0, 1):
if connection.ops.postgis and (2, 0, 0) <= connection.ops.spatial_version <= (2, 0, 1):
test_left_right_lookups = unittest.expectedFailure(test_left_right_lookups)
def test_equals_lookups(self):