Address review comments #75
GitHub Actions / Test Results
failed
Dec 18, 2024 in 0s
3 fail, 1 244 skipped, 359 pass in 11m 51s
Annotations
Check warning on line 0 in test.test_ad7091rx
github-actions / Test Results
test_ad7091rx_raw_attr[raw-0-4000-1000-1-3-voltage0-adi.ad7091rx] (test.test_ad7091rx) failed
results.xml [took 0s]
Raw output
AttributeError: can't set attribute
test_attribute_single_value = <function attribute_single_value at 0x7fc19f35f8b0>
iio_uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', attr = 'raw', start = 0
stop = 4000, step = 1000, tol = 1, repeats = 3, sub_channel = 'voltage0'
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize(
"attr, start, stop, step, tol, repeats, sub_channel",
[
("raw", 0, 4000, 1000, 1, 3, "voltage0"),
("raw", 0, 4000, 1000, 1, 3, "voltage1"),
("raw", 0, 4000, 1000, 1, 3, "voltage2"),
],
)
def test_ad7091rx_raw_attr(
test_attribute_single_value,
iio_uri,
classname,
attr,
start,
stop,
step,
tol,
repeats,
sub_channel,
):
> test_attribute_single_value(
iio_uri, classname, attr, start, stop, step, tol, repeats, sub_channel
)
test/test_ad7091rx.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/attr_tests.py:66: in attribute_single_value
assert dev_interface_sub_channel(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', sub_channel = 'voltage0'
val = 0, attr = 'raw', tol = 1, readonly = False, sleep = 0
def dev_interface_sub_channel(
uri, classname, sub_channel, val, attr, tol, readonly=False, sleep=0,
):
sdr = eval(classname + "(uri='" + uri + "')")
# Check hardware
if not hasattr(sdr, sub_channel):
raise AttributeError(sub_channel + " not defined in " + classname)
if not hasattr(getattr(sdr, sub_channel), attr):
raise AttributeError(attr + " not defined in " + classname)
rval = getattr(getattr(sdr, sub_channel), attr)
is_list = isinstance(rval, list)
if is_list:
l = len(rval)
val = [val] * l
if readonly is False:
> setattr(getattr(sdr, sub_channel), attr, val)
E AttributeError: can't set attribute
test/common.py:165: AttributeError
Check warning on line 0 in test.test_ad7091rx
github-actions / Test Results
test_ad7091rx_raw_attr[raw-0-4000-1000-1-3-voltage1-adi.ad7091rx] (test.test_ad7091rx) failed
results.xml [took 0s]
Raw output
AttributeError: can't set attribute
test_attribute_single_value = <function attribute_single_value at 0x7fc19f35f8b0>
iio_uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', attr = 'raw', start = 0
stop = 4000, step = 1000, tol = 1, repeats = 3, sub_channel = 'voltage1'
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize(
"attr, start, stop, step, tol, repeats, sub_channel",
[
("raw", 0, 4000, 1000, 1, 3, "voltage0"),
("raw", 0, 4000, 1000, 1, 3, "voltage1"),
("raw", 0, 4000, 1000, 1, 3, "voltage2"),
],
)
def test_ad7091rx_raw_attr(
test_attribute_single_value,
iio_uri,
classname,
attr,
start,
stop,
step,
tol,
repeats,
sub_channel,
):
> test_attribute_single_value(
iio_uri, classname, attr, start, stop, step, tol, repeats, sub_channel
)
test/test_ad7091rx.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/attr_tests.py:66: in attribute_single_value
assert dev_interface_sub_channel(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', sub_channel = 'voltage1'
val = 3000, attr = 'raw', tol = 1, readonly = False, sleep = 0
def dev_interface_sub_channel(
uri, classname, sub_channel, val, attr, tol, readonly=False, sleep=0,
):
sdr = eval(classname + "(uri='" + uri + "')")
# Check hardware
if not hasattr(sdr, sub_channel):
raise AttributeError(sub_channel + " not defined in " + classname)
if not hasattr(getattr(sdr, sub_channel), attr):
raise AttributeError(attr + " not defined in " + classname)
rval = getattr(getattr(sdr, sub_channel), attr)
is_list = isinstance(rval, list)
if is_list:
l = len(rval)
val = [val] * l
if readonly is False:
> setattr(getattr(sdr, sub_channel), attr, val)
E AttributeError: can't set attribute
test/common.py:165: AttributeError
Check warning on line 0 in test.test_ad7091rx
github-actions / Test Results
test_ad7091rx_raw_attr[raw-0-4000-1000-1-3-voltage2-adi.ad7091rx] (test.test_ad7091rx) failed
results.xml [took 0s]
Raw output
AttributeError: can't set attribute
test_attribute_single_value = <function attribute_single_value at 0x7fc19f35f8b0>
iio_uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', attr = 'raw', start = 0
stop = 4000, step = 1000, tol = 1, repeats = 3, sub_channel = 'voltage2'
@pytest.mark.iio_hardware(hardware)
@pytest.mark.parametrize("classname", [(classname)])
@pytest.mark.parametrize(
"attr, start, stop, step, tol, repeats, sub_channel",
[
("raw", 0, 4000, 1000, 1, 3, "voltage0"),
("raw", 0, 4000, 1000, 1, 3, "voltage1"),
("raw", 0, 4000, 1000, 1, 3, "voltage2"),
],
)
def test_ad7091rx_raw_attr(
test_attribute_single_value,
iio_uri,
classname,
attr,
start,
stop,
step,
tol,
repeats,
sub_channel,
):
> test_attribute_single_value(
iio_uri, classname, attr, start, stop, step, tol, repeats, sub_channel
)
test/test_ad7091rx.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/attr_tests.py:66: in attribute_single_value
assert dev_interface_sub_channel(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
uri = 'ip:10.1.0.126', classname = 'adi.ad7091rx', sub_channel = 'voltage2'
val = 1000, attr = 'raw', tol = 1, readonly = False, sleep = 0
def dev_interface_sub_channel(
uri, classname, sub_channel, val, attr, tol, readonly=False, sleep=0,
):
sdr = eval(classname + "(uri='" + uri + "')")
# Check hardware
if not hasattr(sdr, sub_channel):
raise AttributeError(sub_channel + " not defined in " + classname)
if not hasattr(getattr(sdr, sub_channel), attr):
raise AttributeError(attr + " not defined in " + classname)
rval = getattr(getattr(sdr, sub_channel), attr)
is_list = isinstance(rval, list)
if is_list:
l = len(rval)
val = [val] * l
if readonly is False:
> setattr(getattr(sdr, sub_channel), attr, val)
E AttributeError: can't set attribute
test/common.py:165: AttributeError
Loading