From ab1667ad72d855dafb291dba8a439810a347747e Mon Sep 17 00:00:00 2001 From: James Frost Date: Fri, 28 Jun 2024 11:19:20 +0100 Subject: [PATCH] Test vertical plotting with a filename specified --- tests/operators/test_plots.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/tests/operators/test_plots.py b/tests/operators/test_plots.py index 096f06cb5..5b5e01625 100644 --- a/tests/operators/test_plots.py +++ b/tests/operators/test_plots.py @@ -132,6 +132,23 @@ def test_plot_vertical_line_series(vertical_profile_cube, tmp_working_dir): assert Path("untitled_473721.0.png").is_file() +def test_plot_vertical_line_series_with_filename( + vertical_profile_cube, tmp_working_dir +): + """Save a vertical line series plot with specific filename. + + The given filename does not haven extension to test that too. + """ + plot.plot_vertical_line_series( + vertical_profile_cube, + filename="Test", + series_coordinate="pressure", + sequence_coordinate="time", + ) + assert Path("Test_473718.0.png").is_file() + assert Path("Test_473721.0.png").is_file() + + def test_plot_vertical_line_series_no_series_coordinate( vertical_profile_cube, tmp_working_dir ):