@@ -5091,11 +5091,7 @@ def test_broken_barh_empty():
50915091 ax .broken_barh ([], (.1 , .5 ))
50925092
50935093
5094- def test_pandas_pcolormesh ():
5095- pd = pytest .importorskip ('pandas' )
5096- from pandas .tseries import converter
5097- converter .register ()
5098-
5094+ def test_pandas_pcolormesh (pd ):
50995095 time = pd .date_range ('2000-01-01' , periods = 10 )
51005096 depth = np .arange (20 )
51015097 data = np .random .rand (20 , 10 )
@@ -5104,11 +5100,7 @@ def test_pandas_pcolormesh():
51045100 ax .pcolormesh (time , depth , data )
51055101
51065102
5107- def test_pandas_indexing_dates ():
5108- pd = pytest .importorskip ('pandas' )
5109- from pandas .tseries import converter
5110- converter .register ()
5111-
5103+ def test_pandas_indexing_dates (pd ):
51125104 dates = np .arange ('2005-02' , '2005-03' , dtype = 'datetime64[D]' )
51135105 values = np .sin (np .array (range (len (dates ))))
51145106 df = pd .DataFrame ({'dates' : dates , 'values' : values })
@@ -5119,42 +5111,30 @@ def test_pandas_indexing_dates():
51195111 ax .plot ('dates' , 'values' , data = without_zero_index )
51205112
51215113
5122- def test_pandas_errorbar_indexing ():
5123- pd = pytest .importorskip ('pandas' )
5124- from pandas .tseries import converter
5125- converter .register ()
5126-
5114+ def test_pandas_errorbar_indexing (pd ):
51275115 df = pd .DataFrame (np .random .uniform (size = (5 , 4 )),
51285116 columns = ['x' , 'y' , 'xe' , 'ye' ],
51295117 index = [1 , 2 , 3 , 4 , 5 ])
51305118 fig , ax = plt .subplots ()
51315119 ax .errorbar ('x' , 'y' , xerr = 'xe' , yerr = 'ye' , data = df )
51325120
51335121
5134- def test_pandas_indexing_hist ():
5135- pd = pytest .importorskip ('pandas' )
5136- from pandas .tseries import converter
5137- converter .register ()
5138-
5122+ def test_pandas_indexing_hist (pd ):
51395123 ser_1 = pd .Series (data = [1 , 2 , 2 , 3 , 3 , 4 , 4 , 4 , 4 , 5 ])
51405124 ser_2 = ser_1 .iloc [1 :]
51415125 fig , axes = plt .subplots ()
51425126 axes .hist (ser_2 )
51435127
51445128
5145- def test_pandas_bar_align_center ():
5129+ def test_pandas_bar_align_center (pd ):
51465130 # Tests fix for issue 8767
5147- pd = pytest .importorskip ('pandas' )
5148- from pandas .tseries import converter
5149- converter .register ()
5150-
51515131 df = pd .DataFrame ({'a' : range (2 ), 'b' : range (2 )})
51525132
51535133 fig , ax = plt .subplots (1 )
51545134
5155- rect = ax .bar (df .loc [df ['a' ] == 1 , 'b' ],
5156- df .loc [df ['a' ] == 1 , 'b' ],
5157- align = 'center' )
5135+ ax .bar (df .loc [df ['a' ] == 1 , 'b' ],
5136+ df .loc [df ['a' ] == 1 , 'b' ],
5137+ align = 'center' )
51585138
51595139 fig .canvas .draw ()
51605140
0 commit comments