summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2015-04-23 16:23:05 +0200
committerClaude Paroz <claude@2xlibre.net>2015-04-23 18:54:07 +0200
commit6d685b16743c9fc15a5e2ce8dc0e13858a157259 (patch)
treea5f4bfda9cf870469d47f1af07a15a93c44d1579 /tests
parentdd99f57710bb4930561a6c049f54719af80850ec (diff)
Fixed failures with older Spatialite versions
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/geoapp/test_functions.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gis_tests/geoapp/test_functions.py b/tests/gis_tests/geoapp/test_functions.py
index b17a1a2fc0..edef090c5b 100644
--- a/tests/gis_tests/geoapp/test_functions.py
+++ b/tests/gis_tests/geoapp/test_functions.py
@@ -2,6 +2,7 @@ from __future__ import unicode_literals
import re
from decimal import Decimal
+from unittest import skipUnless
from django.contrib.gis.db.models import functions
from django.contrib.gis.geos import HAS_GEOS
@@ -12,7 +13,9 @@ from django.utils import six
from ..utils import mysql, oracle, postgis, spatialite
if HAS_GEOS:
- from django.contrib.gis.geos import LineString, Point, Polygon, fromstr
+ from django.contrib.gis.geos import (
+ LineString, Point, Polygon, fromstr, geos_version_info,
+ )
from .models import Country, City, State, Track
@@ -382,6 +385,7 @@ class GISFunctionsTests(TestCase):
)
@skipUnlessDBFeature("has_SymDifference_function")
+ @skipUnless(HAS_GEOS and geos_version_info()['version'] >= '3.3.0', "GEOS >= 3.3 required")
def test_sym_difference(self):
geom = Point(5, 23, srid=4326)
qs = Country.objects.annotate(sym_difference=functions.SymDifference('mpoly', geom))