Skip to content

community/libei: add scanner patch to fix test

mio requested to merge mio/aports:libei into master

Upstream replaced attrs in the ei-scanner protocol parser used by the scanner test. Resolves a failed test in test_scanner.py leading to build failure on a 3.21 builder (error log).

    @pytest.mark.parametrize("component", ("ei",))
    def test_interface_arg(self, protocol: Protocol):
        intf = next((i for i in protocol.interfaces if i.name == "ei_device"))
        event = next((e for e in intf.events if e.name == "interface"))

        obj, interface_name, version = event.arguments
>       assert obj.interface_arg == interface_name

test_scanner.py:54:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
<attrs generated eq eiscanner.Argument>:11: in __eq__
    self.interface_arg_for == other.interface_arg_for and
<attrs generated eq eiscanner.Argument>:10: in __eq__
    self.interface_arg == other.interface_arg and
<attrs generated eq eiscanner.Argument>:11: in __eq__
    self.interface_arg_for == other.interface_arg_for and
E   RecursionError: maximum recursion depth exceeded
!!! Recursion detected (same locals & position)
---------------------------- Captured stdout setup -----------------------------
protocol for component ei
=========================== short test summary info ============================
FAILED test_scanner.py::TestScanner::test_interface_arg[ei] - RecursionError:...

Merge request reports

Loading