Group :: Development/Python3
RPM: python3-module-shapely
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: ef380ba8796702a56e05138ed8599e89f617d2c9.patch
Download
Download
From ef380ba8796702a56e05138ed8599e89f617d2c9 Mon Sep 17 00:00:00 2001
From: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Date: Sun, 10 Jul 2022 11:14:30 +0200
Subject: [PATCH] update parallel offset test for GEOS 3.11
---
tests/test_parallel_offset.py | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/test_parallel_offset.py b/tests/test_parallel_offset.py
index 7dbbe55c..661291a5 100644
--- a/tests/test_parallel_offset.py
+++ b/tests/test_parallel_offset.py
@@ -9,9 +9,11 @@ def test_parallel_offset_linestring(self):
left = line1.parallel_offset(5, 'left')
self.assertEqual(left, LineString([(0, 5), (10, 5)]))
right = line1.parallel_offset(5, 'right')
- self.assertEqual(right, LineString([(10, -5), (0, -5)]))
+ # using spatial equality because the order of coordinates is not guaranteed
+ # (GEOS 3.11 changed this, see https://github.com/shapely/shapely/issues/1436)
+ assert right.equals(LineString([(10, -5), (0, -5)]))
right = line1.parallel_offset(-5, 'left')
- self.assertEqual(right, LineString([(10, -5), (0, -5)]))
+ assert right.equals(LineString([(10, -5), (0, -5)]))
left = line1.parallel_offset(-5, 'right')
self.assertEqual(left, LineString([(0, 5), (10, 5)]))