Coverage for mlos_viz/mlos_viz/tests/test_dabl_plot.py: 100%
12 statements
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 00:44 +0000
« prev ^ index » next coverage.py v7.6.9, created at 2024-12-20 00:44 +0000
1#
2# Copyright (c) Microsoft Corporation.
3# Licensed under the MIT License.
4#
5"""Unit tests for mlos_viz.dabl.plot."""
7import warnings
8from unittest.mock import Mock, patch
10from mlos_bench.storage.base_experiment_data import ExperimentData
11from mlos_viz import dabl
12from mlos_viz.tests import SEABORN_BOXPLOT_PATCH
15@patch(SEABORN_BOXPLOT_PATCH, create=True)
16def test_dabl_plot(mock_boxplot: Mock, exp_data: ExperimentData) -> None:
17 """Tests plotting via dabl."""
18 # For now, just ensure that no errors are thrown.
19 # TODO: Check that a plot was actually produced matching our specifications.
20 with warnings.catch_warnings():
21 warnings.simplefilter("error")
22 dabl.ignore_plotter_warnings()
23 dabl.plot(exp_data)
24 assert mock_boxplot.call_count >= 1