Relaxed MemSize test for CockroachDB.

This commit is contained in:
Tim Graham 2020-12-14 06:28:38 -05:00 committed by GitHub
parent 187e088b48
commit 5a434677a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -386,7 +386,8 @@ class GISFunctionsTests(FuncTestMixin, TestCase):
@skipUnlessDBFeature("has_MemSize_function") @skipUnlessDBFeature("has_MemSize_function")
def test_memsize(self): def test_memsize(self):
ptown = City.objects.annotate(size=functions.MemSize('point')).get(name='Pueblo') ptown = City.objects.annotate(size=functions.MemSize('point')).get(name='Pueblo')
self.assertTrue(20 <= ptown.size <= 40) # Exact value may depend on PostGIS version # Exact value depends on database and version.
self.assertTrue(20 <= ptown.size <= 105)
@skipUnlessDBFeature("has_NumGeom_function") @skipUnlessDBFeature("has_NumGeom_function")
def test_num_geom(self): def test_num_geom(self):