Skip to content

Add support for LTC2672 #40

Add support for LTC2672

Add support for LTC2672 #40

GitHub Actions / Test Results failed Apr 17, 2024 in 0s

14 fail, 1 186 skipped, 280 pass in 9m 59s

1 480 tests  ±0     280 ✅ ± 0   9m 59s ⏱️ +2s
    1 suites ±0   1 186 💤  - 10 
    1 files   ±0      14 ❌ +10 

Results for commit 6d31d3e. ± Comparison against earlier commit 5e6035e.

Annotations

Check warning on line 0 in test.rf.test_spec_est

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_spec_est_t1 (test.rf.test_spec_est) failed

results.xml [took 0s]
Raw output
AttributeError: module 'scipy.signal' has no attribute 'kaiser'
def test_spec_est_t1():
        fs = 64
        length = 600  # seconds
        N = fs * length
        t = linspace(0, length, num=N, endpoint=False)
    
        # Generate a sinusoid at frequency f
        f = 10  # Hz
        a = cos(2 * pi * f * t) * 2 ** 15
    
>       amp, freqs = spec_est(a, fs, ref=2 ** 15, plot=False)

test/rf/test_spec_est.py:17: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = array([ 32768.        ,  18204.92539559, -12539.77071174, ...,
       -32138.37206828, -12539.7707117 ,  18204.92539557])
fs = 64, ref = 32768, plot = False

    def spec_est(x, fs, ref=2 ** 15, plot=False):
    
        N = len(x)
    
        # Apply window
>       window = signal.kaiser(N, beta=38)
E       AttributeError: module 'scipy.signal' has no attribute 'kaiser'

test/rf/spec.py:26: AttributeError

Check warning on line 0 in test.rf.test_spec_est

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_spec_est_t2 (test.rf.test_spec_est) failed

results.xml [took 0s]
Raw output
AttributeError: module 'scipy.signal' has no attribute 'kaiser'
def test_spec_est_t2():
        fs = 64
        length = 600  # seconds
        N = fs * length
        t = linspace(0, length, num=N, endpoint=False)
    
        # Generate a sinusoid at frequency f
        f = 10  # Hz
        a = exp(1j * 2 * pi * f * t) * 2 ** 15
    
>       amp, freqs = spec_est(a, fs, ref=2 ** 15, plot=False)

test/rf/test_spec_est.py:32: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = array([ 32768.            +0.j        ,  18204.92539559+27245.59625593j,
       -12539.77071174+30273.68452133j, ...,
       -32138.37206828 -6392.71967168j, -12539.7707117 -30273.68452134j,
        18204.92539557-27245.59625594j])
fs = 64, ref = 32768, plot = False

    def spec_est(x, fs, ref=2 ** 15, plot=False):
    
        N = len(x)
    
        # Apply window
>       window = signal.kaiser(N, beta=38)
E       AttributeError: module 'scipy.signal' has no attribute 'kaiser'

test/rf/spec.py:26: AttributeError

Check warning on line 0 in test.rf.test_spec_est

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_spec_est_t3 (test.rf.test_spec_est) failed

results.xml [took 0s]
Raw output
AttributeError: module 'scipy.signal' has no attribute 'kaiser'
def test_spec_est_t3():
        fs = 64
        length = 600  # seconds
        N = fs * length
        t = linspace(0, length, num=N, endpoint=False)
    
        # Generate a sinusoid at frequency f
        f = 0  # Hz
        a = cos(2 * pi * f * t) * 2 ** 15
        # a = exp(1j * 2 * pi * f * t) * 2 ** 15
    
>       amp, freqs = spec_est(a, fs, ref=2 ** 15, plot=False)

test/rf/test_spec_est.py:48: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = array([32768., 32768., 32768., ..., 32768., 32768., 32768.]), fs = 64
ref = 32768, plot = False

    def spec_est(x, fs, ref=2 ** 15, plot=False):
    
        N = len(x)
    
        # Apply window
>       window = signal.kaiser(N, beta=38)
E       AttributeError: module 'scipy.signal' has no attribute 'kaiser'

test/rf/spec.py:26: AttributeError

Check warning on line 0 in test.rf.test_spec_est

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_spec_est_t4 (test.rf.test_spec_est) failed

results.xml [took 0s]
Raw output
AttributeError: module 'scipy.signal' has no attribute 'kaiser'
def test_spec_est_t4():
        fs = 64
        length = 600  # seconds
        N = fs * length
        t = linspace(0, length, num=N, endpoint=False)
    
        # Generate a sinusoid at frequency f
        f = 0  # Hz
        # a = cos(2 * pi * f * t) * 2 ** 15
        a = exp(1j * 2 * pi * f * t) * 2 ** 15
    
>       amp, freqs = spec_est(a, fs, ref=2 ** 15, plot=False)

test/rf/test_spec_est.py:64: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

x = array([32768.+0.j, 32768.+0.j, 32768.+0.j, ..., 32768.+0.j, 32768.+0.j,
       32768.+0.j])
fs = 64, ref = 32768, plot = False

    def spec_est(x, fs, ref=2 ** 15, plot=False):
    
        N = len(x)
    
        # Apply window
>       window = signal.kaiser(N, beta=38)
E       AttributeError: module 'scipy.signal' has no attribute 'kaiser'

test/rf/spec.py:26: AttributeError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[span-val0-0-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 3s]
Raw output
ValueError: Error: span setting not supported 
Use one of: str(self.span_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 0, attr = 'span'
val = ['off_mode', '3.125mA', '6.25mA', '12.5mA', '25mA', '50mA', ...]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5e4d0>
value = 'off_mode'

    @span.setter
    def span(self, value):
        """Set channel span setting"""
        if value in self.span_avail:
            self._set_iio_attr(self.name, "span", True, value)
        else:
>           raise ValueError(
                "Error: span setting not supported \nUse one of: "
                "str(self.span_avail)"
            )
E           ValueError: Error: span setting not supported 
E           Use one of: str(self.span_avail)

adi/ltc2672.py:195: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[span-val0-1-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: span setting not supported 
Use one of: str(self.span_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 1, attr = 'span'
val = ['off_mode', '3.125mA', '6.25mA', '12.5mA', '25mA', '50mA', ...]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5ece0>
value = 'off_mode'

    @span.setter
    def span(self, value):
        """Set channel span setting"""
        if value in self.span_avail:
            self._set_iio_attr(self.name, "span", True, value)
        else:
>           raise ValueError(
                "Error: span setting not supported \nUse one of: "
                "str(self.span_avail)"
            )
E           ValueError: Error: span setting not supported 
E           Use one of: str(self.span_avail)

adi/ltc2672.py:195: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[span-val0-2-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: span setting not supported 
Use one of: str(self.span_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 2, attr = 'span'
val = ['off_mode', '3.125mA', '6.25mA', '12.5mA', '25mA', '50mA', ...]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5e740>
value = 'off_mode'

    @span.setter
    def span(self, value):
        """Set channel span setting"""
        if value in self.span_avail:
            self._set_iio_attr(self.name, "span", True, value)
        else:
>           raise ValueError(
                "Error: span setting not supported \nUse one of: "
                "str(self.span_avail)"
            )
E           ValueError: Error: span setting not supported 
E           Use one of: str(self.span_avail)

adi/ltc2672.py:195: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[span-val0-3-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: span setting not supported 
Use one of: str(self.span_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 3, attr = 'span'
val = ['off_mode', '3.125mA', '6.25mA', '12.5mA', '25mA', '50mA', ...]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5eda0>
value = 'off_mode'

    @span.setter
    def span(self, value):
        """Set channel span setting"""
        if value in self.span_avail:
            self._set_iio_attr(self.name, "span", True, value)
        else:
>           raise ValueError(
                "Error: span setting not supported \nUse one of: "
                "str(self.span_avail)"
            )
E           ValueError: Error: span setting not supported 
E           Use one of: str(self.span_avail)

adi/ltc2672.py:195: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[span-val0-4-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: span setting not supported 
Use one of: str(self.span_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 4, attr = 'span'
val = ['off_mode', '3.125mA', '6.25mA', '12.5mA', '25mA', '50mA', ...]

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5f0a0>
value = 'off_mode'

    @span.setter
    def span(self, value):
        """Set channel span setting"""
        if value in self.span_avail:
            self._set_iio_attr(self.name, "span", True, value)
        else:
>           raise ValueError(
                "Error: span setting not supported \nUse one of: "
                "str(self.span_avail)"
            )
E           ValueError: Error: span setting not supported 
E           Use one of: str(self.span_avail)

adi/ltc2672.py:195: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[powerdown-val1-0-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: powerdown setting not supported 
Use one of: str(self.powerdown_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 0
attr = 'powerdown', val = ['powerdown']

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5e4d0>
value = 'powerdown'

    @powerdown.setter
    def powerdown(self, value):
        """Set channel powerdown setting"""
        if value in self.powerdown_avail:
            self._set_iio_attr(self.name, "powerdown", True, value)
        else:
>           raise ValueError(
                "Error: powerdown setting not supported \nUse one of: "
                "str(self.powerdown_avail)"
            )
E           ValueError: Error: powerdown setting not supported 
E           Use one of: str(self.powerdown_avail)

adi/ltc2672.py:216: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[powerdown-val1-1-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: powerdown setting not supported 
Use one of: str(self.powerdown_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 1
attr = 'powerdown', val = ['powerdown']

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5ece0>
value = 'powerdown'

    @powerdown.setter
    def powerdown(self, value):
        """Set channel powerdown setting"""
        if value in self.powerdown_avail:
            self._set_iio_attr(self.name, "powerdown", True, value)
        else:
>           raise ValueError(
                "Error: powerdown setting not supported \nUse one of: "
                "str(self.powerdown_avail)"
            )
E           ValueError: Error: powerdown setting not supported 
E           Use one of: str(self.powerdown_avail)

adi/ltc2672.py:216: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[powerdown-val1-2-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: powerdown setting not supported 
Use one of: str(self.powerdown_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 2
attr = 'powerdown', val = ['powerdown']

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5e740>
value = 'powerdown'

    @powerdown.setter
    def powerdown(self, value):
        """Set channel powerdown setting"""
        if value in self.powerdown_avail:
            self._set_iio_attr(self.name, "powerdown", True, value)
        else:
>           raise ValueError(
                "Error: powerdown setting not supported \nUse one of: "
                "str(self.powerdown_avail)"
            )
E           ValueError: Error: powerdown setting not supported 
E           Use one of: str(self.powerdown_avail)

adi/ltc2672.py:216: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[powerdown-val1-3-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: powerdown setting not supported 
Use one of: str(self.powerdown_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 3
attr = 'powerdown', val = ['powerdown']

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5eda0>
value = 'powerdown'

    @powerdown.setter
    def powerdown(self, value):
        """Set channel powerdown setting"""
        if value in self.powerdown_avail:
            self._set_iio_attr(self.name, "powerdown", True, value)
        else:
>           raise ValueError(
                "Error: powerdown setting not supported \nUse one of: "
                "str(self.powerdown_avail)"
            )
E           ValueError: Error: powerdown setting not supported 
E           Use one of: str(self.powerdown_avail)

adi/ltc2672.py:216: ValueError

Check warning on line 0 in test.test_ltc2672

See this annotation in the file changed.

@github-actions github-actions / Test Results

test_ltc2672_channel_attr[powerdown-val1-4-adi.ltc2672] (test.test_ltc2672) failed

results.xml [took 0s]
Raw output
ValueError: Error: powerdown setting not supported 
Use one of: str(self.powerdown_avail)
iio_uri = 'ip:10.1.0.14', classname = 'adi.ltc2672', channel = 4
attr = 'powerdown', val = ['powerdown']

    @pytest.mark.iio_hardware(hardware)
    @pytest.mark.parametrize("classname", [(classname)])
    @pytest.mark.parametrize("channel", [0, 1, 2, 3, 4])
    @pytest.mark.parametrize(
        "attr, val",
        [
            (
                "span",
                [
                    "off_mode",
                    "3.125mA",
                    "6.25mA",
                    "12.5mA",
                    "25mA",
                    "50mA",
                    "100mA",
                    "200mA",
                    "MVREF",
                    "300mA",
                ],
            ),
            ("powerdown", ["powerdown"],),
        ],
    )
    def test_ltc2672_channel_attr(iio_uri, classname, channel, attr, val):
        dev = adi.ltc2672(iio_uri)
        dev_chan = dev.channel[channel]
        for value in val:
>           setattr(dev_chan, attr, value)

test/test_ltc2672.py:68: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <adi.ltc2672.ltc2672._channel object at 0x7f7d80f5f0a0>
value = 'powerdown'

    @powerdown.setter
    def powerdown(self, value):
        """Set channel powerdown setting"""
        if value in self.powerdown_avail:
            self._set_iio_attr(self.name, "powerdown", True, value)
        else:
>           raise ValueError(
                "Error: powerdown setting not supported \nUse one of: "
                "str(self.powerdown_avail)"
            )
E           ValueError: Error: powerdown setting not supported 
E           Use one of: str(self.powerdown_avail)

adi/ltc2672.py:216: ValueError