id3c.tests.test_ad_plugins ========================== .. py:module:: id3c.tests.test_ad_plugins .. autoapi-nested-parse:: Unit tests for :mod:`id3c.plans.ad_plugins`. These tests use an ophyd ``Device`` with in-memory ``Signal`` components as a stand-in for an area-detector file plugin. No EPICS PVs are required, so the tests run on the off-network development host. Functions --------- .. autoapisummary:: id3c.tests.test_ad_plugins.plugin id3c.tests.test_ad_plugins.test_select_skips_omitted id3c.tests.test_ad_plugins.test_select_includes_config_normal_hinted_readonly id3c.tests.test_ad_plugins.test_select_is_sorted id3c.tests.test_ad_plugins.test_read_prints_table_with_expected_rows id3c.tests.test_ad_plugins.test_read_marks_readonly_access id3c.tests.test_ad_plugins.test_set_emits_one_mv_per_call id3c.tests.test_ad_plugins.test_set_values_propagate_through_messages id3c.tests.test_ad_plugins.test_set_no_kwargs_yields_null_message id3c.tests.test_ad_plugins.test_set_rejects_unknown_kwarg id3c.tests.test_ad_plugins.test_set_rejects_omitted_kwarg id3c.tests.test_ad_plugins.test_set_rejects_readonly_kwarg id3c.tests.test_ad_plugins.test_set_reports_readonly_before_unknown Module Contents --------------- .. py:function:: plugin() Return a freshly constructed fake plugin. .. py:function:: test_select_skips_omitted(plugin) ``omitted`` kind components are not yielded. .. py:function:: test_select_includes_config_normal_hinted_readonly(plugin) All other reportable kinds (including read-only) are yielded. .. py:function:: test_select_is_sorted(plugin) Selection order is alphabetical for predictability. .. py:function:: test_read_prints_table_with_expected_rows(plugin) The diagnostic prints one row per reportable component. .. py:function:: test_read_marks_readonly_access(plugin) Read-only component shows ``R-``; read-write shows ``RW``. .. py:function:: test_set_emits_one_mv_per_call(plugin) Multiple kwargs collapse to a single ``bps.mv`` invocation. .. py:function:: test_set_values_propagate_through_messages(plugin) Each setpoint appears in the corresponding ``Msg.args``. .. py:function:: test_set_no_kwargs_yields_null_message(plugin) An empty call still yields one message (so @plan does not warn). .. py:function:: test_set_rejects_unknown_kwarg(plugin) Unknown kwargs raise ``KeyError`` before any message is yielded. .. py:function:: test_set_rejects_omitted_kwarg(plugin) A kwarg naming an ``omitted``-kind component is unknown. .. py:function:: test_set_rejects_readonly_kwarg(plugin) A kwarg naming a read-only component raises ``TypeError``. .. py:function:: test_set_reports_readonly_before_unknown(plugin) Both errors at once: ``TypeError`` (read-only) wins.