From 754d81edf372aa0988ec1e00a7d8a985419cd5cf Mon Sep 17 00:00:00 2001 From: wyzula-jan Date: Tue, 9 Apr 2024 13:16:21 +0200 Subject: [PATCH] test(plot/figure): test extended to check shortcuts for creating subplots --- tests/test_bec_figure.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tests/test_bec_figure.py b/tests/test_bec_figure.py index bda8355f..6a8eccb8 100644 --- a/tests/test_bec_figure.py +++ b/tests/test_bec_figure.py @@ -228,3 +228,16 @@ def test_clear_all(bec_figure): assert len(bec_figure._widgets) == 0 assert np.shape(bec_figure.grid) == (0,) + + +def test_shortcuts(bec_figure): + plt = bec_figure.plot("samx", "bpm4i") + im = bec_figure.image("eiger") + motor_map = bec_figure.motor_map("samx", "samy") + + assert plt.config.widget_class == "BECWaveform" + assert plt.__class__ == BECWaveform + assert im.config.widget_class == "BECImageShow" + assert im.__class__ == BECImageShow + assert motor_map.config.widget_class == "BECMotorMap" + assert motor_map.__class__ == BECMotorMap