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

Skip to content

Commit 0327d80

Browse files
committed
Add cleanup to tests and fix default rect prop
1 parent f850bff commit 0327d80

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

lib/matplotlib/tests/test_widgets.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ def test_rectangle_selector():
110110
check_rectangle(rectprops=dict(fill=True))
111111

112112

113+
@cleanup
113114
def test_ellipse():
114115
"""For ellipse, test out the key modifiers"""
115116
ax = get_ax()
@@ -163,6 +164,8 @@ def onselect(epress, erelease):
163164
assert tool.geometry.shape == (2, 74)
164165
assert_allclose(tool.geometry[:, 0], [70., 100])
165166

167+
168+
@cleanup
166169
def test_rectangle_handles():
167170
ax = get_ax()
168171

lib/matplotlib/widgets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ def __init__(self, ax, onselect, drawtype='patch',
16961696
if rectprops is None:
16971697
props = dict(mec='r')
16981698
else:
1699-
props = dict(mec=rectprops.get('edgecolor', 'k'))
1699+
props = dict(mec=rectprops.get('edgecolor', 'r'))
17001700
self._corner_order = ['NW', 'NE', 'SE', 'SW']
17011701
xc, yc = self.corners
17021702
self._corner_handles = ToolHandles(self.ax, xc, yc, marker_props=props,

0 commit comments

Comments
 (0)