add a failing Line.intersect(Line) test

These two lines are parallel but do not intersect.  Line.intersect()
finds an incorrect intersection.
pull/42/head
Sebastian Kuzminsky 2018-01-06 22:58:10 -07:00
parent bf95944c49
commit 847b270bc2
1 changed files with 6 additions and 0 deletions

View File

@ -991,6 +991,12 @@ class Test_intersect(unittest.TestCase):
self.assertTrue(len(yix), 1) self.assertTrue(len(yix), 1)
################################################################### ###################################################################
def test_line_line(self):
l0 = Line(start=(25.389999999999997+99.989999999999995j), end=(25.389999999999997+90.484999999999999j))
l1 = Line(start=(25.390000000000001+84.114999999999995j), end=(25.389999999999997+74.604202137430320j))
i = l0.intersect(l1)
assert(len(i)) == 0
class TestPathTools(unittest.TestCase): class TestPathTools(unittest.TestCase):
# moved from test_pathtools.py # moved from test_pathtools.py