Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37902973
en ru br
ALT Linux repos
S:2.0.1-alt2

Group :: Development/Python3
RPM: python3-module-shapely

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: ef380ba8796702a56e05138ed8599e89f617d2c9.patch
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)]))
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin