File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -779,18 +779,20 @@ def test_nonfinite_limits():
779779 ax .plot (x , y )
780780
781781
782- def test_limits_empty_data ():
782+ @pytest .mark .parametrize ('plot_fun, lims' ,
783+ [[plt .plot , (14610.0 , 14974.0 )],
784+ [plt .scatter , (14591.8 , 14992.2 )]])
785+ def test_limits_empty_data (plot_fun , lims ):
783786 # Check that plotting empty data doesn't change autoscaling of dates
784787 x = np .arange ("2010-01-01" , "2011-01-01" , dtype = "datetime64[D]" )
785- lims = (14591.8 , 14992.2 )
786788
787789 fig , ax = plt .subplots ()
788- ax . scatter (x , np .arange (len (x )))
790+ plot_fun (x , np .arange (len (x )))
789791 assert ax .get_xlim () == lims
790792
791793 fig , ax = plt .subplots ()
792- ax . scatter ([], [])
793- ax . scatter (x , np .arange (len (x )))
794+ plot_fun ([], [])
795+ plot_fun (x , np .arange (len (x )))
794796 assert ax .get_xlim () == lims
795797
796798
You can’t perform that action at this time.
0 commit comments