Skip to content

Commit

Permalink
TST: Add simple test for addYChannel in timeplot
Browse files Browse the repository at this point in the history
Signed-off-by: flowln <[email protected]>
  • Loading branch information
flowln committed Oct 26, 2023
1 parent 0d9ac32 commit 6aff422
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pydm/tests/widgets/test_timeplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 6aff422

Please sign in to comment.