From cc4573ffc75b0646011fe2399cd614687e3b58e6 Mon Sep 17 00:00:00 2001 From: Sebastian Kuzminsky Date: Sat, 20 Jan 2018 20:36:25 -0700 Subject: [PATCH] add a failing Line.intersect(Line) test I introduced this bug recently, sorry! The bug is fixed in the following commit. --- test/test_path.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_path.py b/test/test_path.py index 57b2daa..8474b26 100644 --- a/test/test_path.py +++ b/test/test_path.py @@ -997,6 +997,13 @@ class Test_intersect(unittest.TestCase): i = l0.intersect(l1) assert(len(i)) == 0 + def test_line_line_1(self): + l0 = Line(start=(-124.705378549+327.696674827j), end=(12.4926214511+121.261674827j)) + l1 = Line(start=(-12.4926214511+121.261674827j), end=(124.705378549+327.696674827j)) + i = l0.intersect(l1) + assert(len(i)) == 1 + assert(abs(l0.point(i[0][0])-l1.point(i[0][1])) < 1e-9) + class TestPathTools(unittest.TestCase): # moved from test_pathtools.py