Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d65c741

Browse files
committed
Added test for negative radius in Path.contains_points
1 parent 1a3d441 commit d65c741

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/matplotlib/tests/test_path.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ def test_point_in_path():
2727

2828
assert np.all(path.contains_points(points) == [True, False])
2929

30+
def test_contains_points_negative_radius():
31+
path = Path.unit_circle()
32+
33+
points = [(0.0, 0.0), (1.25, 0.0)]
34+
35+
assert np.all(path.contains_points(points, radius = -0.5) == [True, False] )
3036

3137
if __name__ == '__main__':
3238
import nose

0 commit comments

Comments
 (0)