Commit af441213 authored by Federico Vaga's avatar Federico Vaga

tst: fix offset parameters

The real upper limit is +4.999999 V and not +v5.000000. The system
before was silently accepting 5V but it was wrong. Now it correctly
complains, therefore the test needs a fix.
Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 1a3eb2fc
......@@ -80,7 +80,7 @@ class TestAdcGetterSetterChannel(object):
adc100m14b4cha.retrieve_config(conf_rb)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_TERMINATION) == conf_rb.value_get(PyAdcConf.ADC_CONF_CHN_TERMINATION)
@pytest.mark.parametrize("offset", range(-5000000, 5000000 + 1, 100000))
@pytest.mark.parametrize("offset", range(-5000000, 4999999 + 1, 100000))
@pytest.mark.parametrize("channel", range(4))
def test_adc_offset(self, adc100m14b4cha, offset, channel):
"""Test that we can read/write offset on all channels"""
......@@ -94,7 +94,7 @@ class TestAdcGetterSetterChannel(object):
adc100m14b4cha.retrieve_config(conf_rb)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_OFFSET) == conf_rb.value_get(PyAdcConf.ADC_CONF_CHN_OFFSET)
@pytest.mark.parametrize("offset", [-5000001, 5000001])
@pytest.mark.parametrize("offset", [-5000001, 5000000])
@pytest.mark.parametrize("channel", range(4))
def test_adc_offset_invalid(self, adc100m14b4cha, offset, channel):
"""Test that we can read/write offset on all channels"""
......
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