@@ -73,12 +73,13 @@ def test_function_call_without_data(func):
73
73
assert (func (None , x = "x" , y = "y" , label = "text" ) ==
74
74
"x: ['x'], y: ['y'], ls: x, w: xyz, label: text" )
75
75
76
+
76
77
@pytest .mark .parametrize ('func' , all_funcs , ids = all_func_ids )
77
78
def test_function_call_with_dict_input (func ):
78
79
"""Tests with dict input, unpacking via preprocess_pipeline"""
79
- data = {'a' : 1 , 'b' : 2 }
80
+ data = {'a' : 1 , 'b' : 2 }
80
81
assert (func (None , data .keys (), data .values ()) ==
81
- "x: ['a', 'b'], y: [1, 2], ls: x, w: xyz, label: None" )
82
+ "x: ['a', 'b'], y: [1, 2], ls: x, w: xyz, label: None" )
82
83
83
84
84
85
@pytest .mark .parametrize ('func' , all_funcs , ids = all_func_ids )
@@ -227,25 +228,23 @@ def funcy(ax, x, y, z, t=None):
227
228
228
229
class TestPlotTypes :
229
230
plotters = [Axes .scatter , Axes .bar , Axes .plot ]
230
-
231
231
@pytest .mark .parametrize ('plotter' , plotters )
232
232
@check_figures_equal (extensions = ['png' ])
233
233
def test_dict_unpack (self , plotter , fig_test , fig_ref ):
234
- x = [1 ,2 , 3 ]
235
- y = [4 ,5 , 6 ]
236
- ddict = dict (zip (x ,y ))
234
+ x = [1 , 2 , 3 ]
235
+ y = [4 , 5 , 6 ]
236
+ ddict = dict (zip (x , y ))
237
237
238
- plotter (fig_test .subplots (),
238
+ plotter (fig_test .subplots (),
239
239
ddict .keys (), ddict .values ())
240
240
plotter (fig_ref .subplots (), x , y )
241
241
242
242
@pytest .mark .parametrize ('plotter' , plotters )
243
243
@check_figures_equal (extensions = ['png' ])
244
244
def test_data_kwarg (self , plotter , fig_test , fig_ref ):
245
- x = [1 ,2 , 3 ]
246
- y = [4 ,5 , 6 ]
245
+ x = [1 , 2 , 3 ]
246
+ y = [4 , 5 , 6 ]
247
247
248
- plotter (fig_test .subplots (), 'xval' , 'yval' ,
249
- data = {'xval' :x , 'yval' :y })
250
- plotter (fig_ref .subplots (), x , y )
251
-
248
+ plotter (fig_test .subplots (), 'xval' , 'yval' ,
249
+ data = {'xval' : x , 'yval' : y })
250
+ plotter (fig_ref .subplots (), x , y )
0 commit comments