Commit 47e08db9 authored by Jose Tiago Macara Coutinho's avatar Jose Tiago Macara Coutinho Committed by Vincent Michel

pepu: add tests on channel configuration

parent 422caab0
......@@ -10,7 +10,7 @@ Run with:
import pytest
from bliss.common import scans
from bliss.controllers.pepu import PEPU, Signal, Trigger
from bliss.controllers.pepu import PEPU, Signal, Trigger, ChannelMode
pytestmark = pytest.mark.pepu
......@@ -46,6 +46,27 @@ def test_read_in_channels(pepu, channel_id):
assert channel.value in [-1., 0.]
@pytest.mark.parametrize("channel_id", range(1, 7))
def test_in_channel_config(pepu, channel_id):
channel = pepu.in_channels[channel_id]
# test state
enabled = channel.enabled
assert channel.enabled is True or channel.enabled is False
# disabled the state
channel.enabled = False
assert channel.enabled is False
# test mode
mode = channel.mode
assert channel.mode in tuple(ChannelMode)
channel.mode = ChannelMode.BISS
assert channel.mode == ChannelMode.BISS
@pytest.mark.parametrize("channel_id", [7, 8])
def test_read_out_channels(pepu, channel_id):
channel = pepu.out_channels[channel_id]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment