summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTim Graham <timograham@gmail.com>2020-11-30 01:29:00 -0500
committerGitHub <noreply@github.com>2020-11-30 07:29:00 +0100
commit371022a20dba6ca12297e6f8bae4effe00bd5c50 (patch)
tree5e39e017657f70020e76f8091d3d2cf81c2d6ca2 /tests
parent3828427f634e1880467689e4cf0f8ffee95f0d05 (diff)
Added SpatialFeatures.supports_tolerance_parameter.
Diffstat (limited to 'tests')
-rw-r--r--tests/gis_tests/distapp/tests.py10
-rw-r--r--tests/gis_tests/geoapp/tests.py10
2 files changed, 4 insertions, 16 deletions
diff --git a/tests/gis_tests/distapp/tests.py b/tests/gis_tests/distapp/tests.py
index dbf8c4b6fd..10a0f99efc 100644
--- a/tests/gis_tests/distapp/tests.py
+++ b/tests/gis_tests/distapp/tests.py
@@ -432,10 +432,7 @@ class DistanceFunctionsTests(FuncTestMixin, TestCase):
).filter(d=D(m=1))
self.assertTrue(qs.exists())
- @unittest.skipUnless(
- connection.vendor == 'oracle',
- 'Oracle supports tolerance parameter.',
- )
+ @skipUnlessDBFeature('supports_tolerance_parameter')
def test_distance_function_tolerance_escaping(self):
qs = Interstate.objects.annotate(
d=Distance(
@@ -448,10 +445,7 @@ class DistanceFunctionsTests(FuncTestMixin, TestCase):
with self.assertRaisesMessage(TypeError, msg):
qs.exists()
- @unittest.skipUnless(
- connection.vendor == 'oracle',
- 'Oracle supports tolerance parameter.',
- )
+ @skipUnlessDBFeature('supports_tolerance_parameter')
def test_distance_function_tolerance(self):
# Tolerance is greater than distance.
qs = Interstate.objects.annotate(
diff --git a/tests/gis_tests/geoapp/tests.py b/tests/gis_tests/geoapp/tests.py
index 607db43d4a..350bd04629 100644
--- a/tests/gis_tests/geoapp/tests.py
+++ b/tests/gis_tests/geoapp/tests.py
@@ -607,10 +607,7 @@ class GeoQuerySetTest(TestCase):
), True)
self.assertIn('subquery', ctx.captured_queries[0]['sql'])
- @unittest.skipUnless(
- connection.vendor == 'oracle',
- 'Oracle supports tolerance parameter.',
- )
+ @skipUnlessDBFeature('supports_tolerance_parameter')
def test_unionagg_tolerance(self):
City.objects.create(
point=fromstr('POINT(-96.467222 32.751389)', srid=4326),
@@ -633,10 +630,7 @@ class GeoQuerySetTest(TestCase):
True,
)
- @unittest.skipUnless(
- connection.vendor == 'oracle',
- 'Oracle supports tolerance parameter.',
- )
+ @skipUnlessDBFeature('supports_tolerance_parameter')
def test_unionagg_tolerance_escaping(self):
tx = Country.objects.get(name='Texas').mpoly
with self.assertRaises(DatabaseError):