diff --git a/tests/gtfs/test_multi_validation.py b/tests/gtfs/test_multi_validation.py index 747bd9f0..6638795e 100644 --- a/tests/gtfs/test_multi_validation.py +++ b/tests/gtfs/test_multi_validation.py @@ -699,6 +699,14 @@ def test__plot_core(self, multi_gtfs_fixture): "markers+lines", "lines+markers", ], "Markers not plotted" + # rolling average + avg_fig = multi_gtfs_fixture._plot_core( + data, "trip_count", rolling_average=7 + ) + found_ylabel = avg_fig.layout["yaxis"]["title"]["text"] + assert ( + found_ylabel == "7 Day Rolling Average" + ), "Rolling average not plotted" def test_plot_routes(self, multi_gtfs_fixture): """General tests for .plot_routes().""" @@ -708,6 +716,12 @@ def test_plot_routes(self, multi_gtfs_fixture): # plot without route type fig = multi_gtfs_fixture.plot_routes(False) assert len(fig.data) == 1, "Plot not as expected" + # rolling average + no route type + avg_fig = multi_gtfs_fixture.plot_routes( + rolling_average=7, route_type=False + ) + leg_status = avg_fig.data[0]["showlegend"] + assert not leg_status, "Multiple route types found" def test_plot_trips(self, multi_gtfs_fixture): """General tests for .plot_trips()."""