@@ -1164,10 +1164,10 @@ def polygon_remove_vertex(xdata, ydata):
11641164 ('release' , dict (xdata = xdata , ydata = ydata , button = 3 ))]
11651165
11661166
1167- @pytest .mark .parametrize ('draw_box ' , [False , True ])
1168- def test_polygon_selector (draw_box ):
1167+ @pytest .mark .parametrize ('draw_bounding_box ' , [False , True ])
1168+ def test_polygon_selector (draw_bounding_box ):
11691169 check_selector = functools .partial (
1170- check_polygon_selector , draw_box = draw_box )
1170+ check_polygon_selector , draw_bounding_box = draw_bounding_box )
11711171
11721172 # Simple polygon
11731173 expected_result = [(50 , 50 ), (150 , 50 ), (50 , 150 )]
@@ -1264,8 +1264,8 @@ def test_polygon_selector(draw_box):
12641264 check_selector (event_sequence , expected_result , 1 )
12651265
12661266
1267- @pytest .mark .parametrize ('draw_box ' , [False , True ])
1268- def test_polygon_selector_set_props_handle_props (draw_box ):
1267+ @pytest .mark .parametrize ('draw_bounding_box ' , [False , True ])
1268+ def test_polygon_selector_set_props_handle_props (draw_bounding_box ):
12691269 ax = get_ax ()
12701270
12711271 ax ._selections_count = 0
@@ -1277,7 +1277,7 @@ def onselect(vertices):
12771277 tool = widgets .PolygonSelector (ax , onselect ,
12781278 props = dict (color = 'b' , alpha = 0.2 ),
12791279 handle_props = dict (alpha = 0.5 ),
1280- draw_box = draw_box )
1280+ draw_bounding_box = draw_bounding_box )
12811281
12821282 event_sequence = (polygon_place_vertex (50 , 50 )
12831283 + polygon_place_vertex (150 , 50 )
@@ -1319,8 +1319,8 @@ def onselect(verts):
13191319
13201320# Change the order that the extra point is inserted in
13211321@pytest .mark .parametrize ('idx' , [1 , 2 , 3 ])
1322- @pytest .mark .parametrize ('draw_box ' , [False , True ])
1323- def test_polygon_selector_remove (idx , draw_box ):
1322+ @pytest .mark .parametrize ('draw_bounding_box ' , [False , True ])
1323+ def test_polygon_selector_remove (idx , draw_bounding_box ):
13241324 verts = [(50 , 50 ), (150 , 50 ), (50 , 150 )]
13251325 event_sequence = [polygon_place_vertex (* verts [0 ]),
13261326 polygon_place_vertex (* verts [1 ]),
@@ -1333,22 +1333,24 @@ def test_polygon_selector_remove(idx, draw_box):
13331333 event_sequence .append (polygon_remove_vertex (200 , 200 ))
13341334 # Flatten list of lists
13351335 event_sequence = sum (event_sequence , [])
1336- check_polygon_selector (event_sequence , verts , 2 , draw_box = draw_box )
1336+ check_polygon_selector (event_sequence , verts , 2 ,
1337+ draw_bounding_box = draw_bounding_box )
13371338
13381339
1339- @pytest .mark .parametrize ('draw_box ' , [False , True ])
1340- def test_polygon_selector_remove_first_point (draw_box ):
1340+ @pytest .mark .parametrize ('draw_bounding_box ' , [False , True ])
1341+ def test_polygon_selector_remove_first_point (draw_bounding_box ):
13411342 verts = [(50 , 50 ), (150 , 50 ), (50 , 150 )]
13421343 event_sequence = (polygon_place_vertex (* verts [0 ]) +
13431344 polygon_place_vertex (* verts [1 ]) +
13441345 polygon_place_vertex (* verts [2 ]) +
13451346 polygon_place_vertex (* verts [0 ]) +
13461347 polygon_remove_vertex (* verts [0 ]))
1347- check_polygon_selector (event_sequence , verts [1 :], 2 , draw_box = draw_box )
1348+ check_polygon_selector (event_sequence , verts [1 :], 2 ,
1349+ draw_bounding_box = draw_bounding_box )
13481350
13491351
1350- @pytest .mark .parametrize ('draw_box ' , [False , True ])
1351- def test_polygon_selector_redraw (draw_box ):
1352+ @pytest .mark .parametrize ('draw_bounding_box ' , [False , True ])
1353+ def test_polygon_selector_redraw (draw_bounding_box ):
13521354 verts = [(50 , 50 ), (150 , 50 ), (50 , 150 )]
13531355 event_sequence = (polygon_place_vertex (* verts [0 ]) +
13541356 polygon_place_vertex (* verts [1 ]) +
@@ -1366,7 +1368,8 @@ def test_polygon_selector_redraw(draw_box):
13661368 def onselect (vertices ):
13671369 pass
13681370
1369- tool = widgets .PolygonSelector (ax , onselect , draw_box = draw_box )
1371+ tool = widgets .PolygonSelector (ax , onselect ,
1372+ draw_bounding_box = draw_bounding_box )
13701373 for (etype , event_args ) in event_sequence :
13711374 do_event (tool , etype , ** event_args )
13721375 # After removing two verts, only one remains, and the
@@ -1411,7 +1414,7 @@ def onselect(vertices):
14111414 pass
14121415
14131416 # Create selector
1414- tool = widgets .PolygonSelector (ax , onselect , draw_box = True )
1417+ tool = widgets .PolygonSelector (ax , onselect , draw_bounding_box = True )
14151418 for (etype , event_args ) in event_sequence :
14161419 do_event (tool , etype , ** event_args )
14171420
0 commit comments