Commit 31723866 authored by Federico Vaga's avatar Federico Vaga

tst: fix python docstring

Signed-off-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent d1f07ef6
......@@ -20,21 +20,21 @@ class TestAdcGetterSetterBoard(object):
assert conf.value_get(PyAdcConf.ADC_CONF_BRD_STATE_MACHINE_STATUS) == 1
def test_adc_n_chan(self, adc100m14b4cha):
"Test that we can get the number of channels"
"""Test that we can get the number of channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_BRD, 0)
conf.mask_set(PyAdcConf.ADC_CONF_BRD_N_CHAN)
adc100m14b4cha.retrieve_config(conf)
assert conf.value_get(PyAdcConf.ADC_CONF_BRD_N_CHAN) == 4
def test_adc_n_trg_ext(self, adc100m14b4cha):
"Test that we get the number of external triggers"
"""Test that we get the number of external triggers"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_BRD, 0)
conf.mask_set(PyAdcConf.ADC_CONF_BRD_N_TRG_EXT)
adc100m14b4cha.retrieve_config(conf)
assert conf.value_get(PyAdcConf.ADC_CONF_BRD_N_TRG_EXT) == 1
def test_adc_n_trg_thr(self, adc100m14b4cha):
"Test that we get the number of threshold triggers"
"""Test that we get the number of threshold triggers"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_BRD, 0)
conf.mask_set(PyAdcConf.ADC_CONF_BRD_N_CHAN)
conf.mask_set(PyAdcConf.ADC_CONF_BRD_N_TRG_THR)
......@@ -43,7 +43,7 @@ class TestAdcGetterSetterBoard(object):
assert conf.value_get(PyAdcConf.ADC_CONF_BRD_N_CHAN) == 4
def test_adc_n_trg_ext(self, adc100m14b4cha):
"Test that we get the number of timer triggers"
"""Test that we get the number of timer triggers"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_BRD, 0)
conf.mask_set(PyAdcConf.ADC_CONF_BRD_N_TRG_TIM)
adc100m14b4cha.retrieve_config(conf)
......@@ -55,7 +55,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("vref", [0x45, 0x11, 0x23])
@pytest.mark.parametrize("channel", range(4))
def test_adc_vref(self, adc100m14b4cha, vref, channel):
"Test that we can read/write vref on all channels"
"""Test that we can read/write vref on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_RANGE, vref)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_RANGE) == ctypes.c_uint32(vref).value
......@@ -69,7 +69,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("termination", [True, False])
@pytest.mark.parametrize("channel", range(4))
def test_adc_termination(self, adc100m14b4cha, termination, channel):
"Test that we can read/write termination on all channels"
"""Test that we can read/write termination on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_TERMINATION, int(termination))
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_TERMINATION) == int(termination)
......@@ -83,7 +83,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("offset", range(-5000000, 5000000 + 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"
"""Test that we can read/write offset on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_OFFSET, offset)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_OFFSET) == ctypes.c_uint32(offset).value
......@@ -97,7 +97,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("offset", [-5000001, 5000001])
@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"
"""Test that we can read/write offset on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_OFFSET, offset)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_OFFSET) == ctypes.c_uint32(offset).value
......@@ -107,7 +107,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("saturation", range(0, 0x7FFF, 1000))
@pytest.mark.parametrize("channel", range(4))
def test_adc_saturation(self, adc100m14b4cha, saturation, channel):
"Test that we can read/write saturation on all channels"
"""Test that we can read/write saturation on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_SATURATION, saturation)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_SATURATION) == ctypes.c_uint32(saturation).value
......@@ -121,7 +121,7 @@ class TestAdcGetterSetterChannel(object):
@pytest.mark.parametrize("saturation", [random.randrange(0x8000, 0xFFFFFFFF) for i in range(10)])
@pytest.mark.parametrize("channel", range(4))
def test_adc_saturation_invalid(self, adc100m14b4cha, saturation, channel):
"Test that we can read/write saturation on all channels"
"""Test that we can read/write saturation on all channels"""
conf = PyAdcConf(PyAdcConf.ADC_CONF_TYPE_CHN, channel)
conf.value_set(PyAdcConf.ADC_CONF_CHN_SATURATION, saturation)
assert conf.value_get(PyAdcConf.ADC_CONF_CHN_SATURATION) == ctypes.c_uint32(saturation).value
......
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