add a failing arc/line intersection test

The arc and the line are far apart and clearly non-overlapping, but the
intersection function erroneously returns an intersection.
pull/38/head
Sebastian Kuzminsky 2017-12-30 19:53:11 -07:00
parent bf95944c49
commit 581cb2d3fe
1 changed files with 10 additions and 0 deletions

View File

@ -992,6 +992,16 @@ class Test_intersect(unittest.TestCase):
###################################################################
def test_intersect_arc_line_disjoint_bboxes(self):
# The arc is very short, which contributes to the problem here.
l = Line(start=(125.314540561+144.192926144j), end=(125.798713132+144.510685287j))
a = Arc(start=(128.26640649+146.908463323j), radius=(2+2j),
rotation=0, large_arc=False, sweep=True,
end=(128.26640606+146.90846449j))
i = l.intersect(a)
assert(i == [])
class TestPathTools(unittest.TestCase):
# moved from test_pathtools.py