Add test to verify fix in issue682
@@ -71,6 +71,10 @@ class SubstringTestCase(unittest.TestCase):
self.assertTrue(substring(self.line2, 0, 0.9, True).equals(LineString(([3, 0], [3, 6], [3.75, 6]))))
self.assertTrue(substring(self.line2, 0.2, 1, True).equals(LineString(([3, 1.5], [3, 6], [4.5, 6]))))
+ @unittest.skipIf(geos_version < (3, 2, 0), 'GEOS 3.2.0 required')
+ def test_return_substring_issue682(self):
+ assert list(substring(self.line2, 0.1, 0).coords) == [(3.0, 0.1), (3.0, 0.0)]
+
def test_suite():
loader = unittest.TestLoader()
