From 6aff42290583f8b119b250afb88e901d6d6e6f91 Mon Sep 17 00:00:00 2001 From: flow Date: Wed, 25 Oct 2023 21:16:53 -0300 Subject: [PATCH] TST: Add simple test for addYChannel in timeplot Signed-off-by: flowln --- pydm/tests/widgets/test_timeplot.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/pydm/tests/widgets/test_timeplot.py b/pydm/tests/widgets/test_timeplot.py index fa72c3f17..737a8a842 100644 --- a/pydm/tests/widgets/test_timeplot.py +++ b/pydm/tests/widgets/test_timeplot.py @@ -221,6 +221,16 @@ def test_pydmtimeplot_construct(qtbot): assert pydm_timeplot._bottom_axis.orientation == "bottom" +def test_pydmtimeplot_add_curve(qtbot): + pydm_timeplot = PyDMTimePlot() + qtbot.addWidget(pydm_timeplot) + + curve_pv = "loc://test:timeplot:pv" + pydm_timeplot.addYChannel(curve_pv) + + assert pydm_timeplot.findCurve(curve_pv) is not None + + @mock.patch("pydm.widgets.timeplot.TimePlotCurveItem.setData") @mock.patch("pyqtgraph.BarGraphItem.setOpts") def test_redraw_plot(mocked_set_opts, mocked_set_data, qtbot, monkeypatch):