File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -565,6 +565,31 @@ def test_no_field_error_barbs():
565565 barbs .draw ()
566566
567567
568+ @needs_cartopy
569+ def test_too_big_error_barbs ():
570+ """Make sure we get an error when we are about to draw too many pennants."""
571+ data = xr .open_dataset (get_test_data ('narr_example.nc' , as_file_obj = False )).squeeze ()
572+
573+ bp = BarbPlot ()
574+ bp .data = data
575+ bp .field = ['u_wind' , 'v_wind' ]
576+ bp .level = 500
577+ bp .scale = 1e4
578+ bp .skip = [8 , 8 ]
579+
580+ mp = MapPanel ()
581+ mp .layout = (1 , 1 , 1 )
582+ mp .area = (- 100 , - 70 , 30 , 45 )
583+ mp .plots = [bp ]
584+
585+ pc = PanelContainer ()
586+ pc .size = (10 , 8 )
587+ pc .panels = [mp ]
588+
589+ with pytest .raises (ValueError ):
590+ pc .draw ()
591+
592+
568593@pytest .mark .mpl_image_compare (remove_text = True , tolerance = 0.377 )
569594def test_projection_object (ccrs , cfeature ):
570595 """Test that we can pass a custom map projection."""
You can’t perform that action at this time.
0 commit comments