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

Skip to content

Commit edfbd10

Browse files
committed
Added point which is inside the unit circle but not inside a circle of radius 0.5
1 parent d65c741 commit edfbd10

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/tests/test_path.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ def test_point_in_path():
3030
def test_contains_points_negative_radius():
3131
path = Path.unit_circle()
3232

33-
points = [(0.0, 0.0), (1.25, 0.0)]
33+
points = [(0.0, 0.0), (1.25, 0.0), (0.9, 0.9)]
34+
expected = [True, False, False]
3435

35-
assert np.all(path.contains_points(points, radius = -0.5) == [True, False] )
36+
assert np.all(path.contains_points(points, radius=-0.5) == expected)
3637

3738
if __name__ == '__main__':
3839
import nose

0 commit comments

Comments
 (0)