diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 12:27:04 +0100 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2022-02-08 19:25:02 +0100 |
| commit | 3278c31fa59b41d03aea167f4cf85f4ddf7f848d (patch) | |
| tree | 0c80b4868391296335580242c8e65052a4f62a6b /tests/gis_tests/geoapp/test_functions.py | |
| parent | 6a682b38e75d4c975b4c4493565a59f1bc14397c (diff) | |
[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line length.
Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
Diffstat (limited to 'tests/gis_tests/geoapp/test_functions.py')
| -rw-r--r-- | tests/gis_tests/geoapp/test_functions.py | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/tests/gis_tests/geoapp/test_functions.py b/tests/gis_tests/geoapp/test_functions.py index 076e51b7a2..b632d2cf61 100644 --- a/tests/gis_tests/geoapp/test_functions.py +++ b/tests/gis_tests/geoapp/test_functions.py @@ -36,12 +36,14 @@ class GISFunctionsTests(FuncTestMixin, TestCase): '{"name":"EPSG:4326"}},"coordinates":[-95.363151,29.763374]}' ) victoria_json = json.loads( - '{"type":"Point","bbox":[-123.30519600,48.46261100,-123.30519600,48.46261100],' + '{"type":"Point",' + '"bbox":[-123.30519600,48.46261100,-123.30519600,48.46261100],' '"coordinates":[-123.305196,48.462611]}' ) chicago_json = json.loads( '{"type":"Point","crs":{"type":"name","properties":{"name":"EPSG:4326"}},' - '"bbox":[-87.65018,41.85039,-87.65018,41.85039],"coordinates":[-87.65018,41.85039]}' + '"bbox":[-87.65018,41.85039,-87.65018,41.85039],' + '"coordinates":[-87.65018,41.85039]}' ) if "crs" in connection.features.unsupported_geojson_options: del houston_json["crs"] @@ -131,8 +133,10 @@ class GISFunctionsTests(FuncTestMixin, TestCase): if connection.ops.oracle: # No precision parameter for Oracle :-/ gml_regex = re.compile( - r'^<gml:Point srsName="EPSG:4326" xmlns:gml="http://www.opengis.net/gml">' - r'<gml:coordinates decimal="\." cs="," ts=" ">-104.60925\d+,38.25500\d+ ' + r'^<gml:Point srsName="EPSG:4326" ' + r'xmlns:gml="http://www.opengis.net/gml">' + r'<gml:coordinates decimal="\." cs="," ts=" ">' + r"-104.60925\d+,38.25500\d+ " r"</gml:coordinates></gml:Point>" ) else: @@ -588,7 +592,8 @@ class GISFunctionsTests(FuncTestMixin, TestCase): # to pass into GEOS `equals_exact`. tol = 0.000000001 - # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.1)) FROM "geoapp_country" + # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.1)) + # FROM "geoapp_country" # WHERE "geoapp_country"."name" = 'San Marino'; ref = fromstr("MULTIPOLYGON(((12.4 44,12.5 44,12.5 43.9,12.4 43.9,12.4 44)))") self.assertTrue( @@ -600,7 +605,8 @@ class GISFunctionsTests(FuncTestMixin, TestCase): ) ) - # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.05, 0.23)) FROM "geoapp_country" + # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.05, 0.23)) + # FROM "geoapp_country" # WHERE "geoapp_country"."name" = 'San Marino'; ref = fromstr( "MULTIPOLYGON(((12.4 43.93,12.45 43.93,12.5 43.93,12.45 43.93,12.4 43.93)))" @@ -614,10 +620,12 @@ class GISFunctionsTests(FuncTestMixin, TestCase): ) ) - # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.5, 0.17, 0.05, 0.23)) FROM "geoapp_country" + # SELECT AsText(ST_SnapToGrid("geoapp_country"."mpoly", 0.5, 0.17, 0.05, 0.23)) + # FROM "geoapp_country" # WHERE "geoapp_country"."name" = 'San Marino'; ref = fromstr( - "MULTIPOLYGON(((12.4 43.87,12.45 43.87,12.45 44.1,12.5 44.1,12.5 43.87,12.45 43.87,12.4 43.87)))" + "MULTIPOLYGON(((12.4 43.87,12.45 43.87,12.45 44.1,12.5 44.1,12.5 43.87," + "12.45 43.87,12.4 43.87)))" ) self.assertTrue( ref.equals_exact( |
