diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-10-21 20:23:58 +0200 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2021-10-21 20:25:28 +0200 |
| commit | a2e1cdc8cacff6726705389ef221e8cbdd79f9dd (patch) | |
| tree | 4bb6fc2ff86a977ed13b1ab4ce22db36cdade47e /tests | |
| parent | 354bbf1fd22cd0a826e8da75ba16bc28fc274868 (diff) | |
[4.0.x] Fixed #33215 -- Confirmed support for GEOS 3.10.
Backport of 9231526af4b9825583b0d3cb943f88109fd30551 from main
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/gis_tests/geos_tests/test_io.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/gis_tests/geos_tests/test_io.py b/tests/gis_tests/geos_tests/test_io.py index 1ab7d6483e..a2efc650c8 100644 --- a/tests/gis_tests/geos_tests/test_io.py +++ b/tests/gis_tests/geos_tests/test_io.py @@ -3,6 +3,7 @@ import binascii from django.contrib.gis.geos import ( GEOSGeometry, Point, Polygon, WKBReader, WKBWriter, WKTReader, WKTWriter, ) +from django.contrib.gis.geos.libgeos import geos_version_tuple from django.test import SimpleTestCase @@ -40,7 +41,10 @@ class GEOSIOTest(SimpleTestCase): def test_wktwriter_constructor_arguments(self): wkt_w = WKTWriter(dim=3, trim=True, precision=3) ref = GEOSGeometry('POINT (5.34562 23 1.5)') - ref_wkt = 'POINT Z (5.35 23 1.5)' + if geos_version_tuple() > (3, 10): + ref_wkt = 'POINT Z (5.346 23 1.5)' + else: + ref_wkt = 'POINT Z (5.35 23 1.5)' self.assertEqual(ref_wkt, wkt_w.write(ref).decode()) def test03_wkbreader(self): |
