Source: devolo-plc-api
Version: 1.5.1-2
Severity: serious
Tags: ftbfs
Forwarded: https://github.com/2Fake/devolo_plc_api/pull/224

https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/devolo-plc-api.html

...
=================================== FAILURES ===================================
___________________________ TestDevice.test_connect ____________________________

self = <tests.test_device.TestDevice object at 0x7fc68776f530>
mock_device = <devolo_plc_api.device.Device object at 0x7fc68766fb10>

    def test_connect(self, mock_device: Device):
        """Test that the sync connect method just calls the async connect 
method."""
        with patch("devolo_plc_api.device.Device.async_connect", 
new=AsyncMock()) as ac:
>           mock_device.connect()

tests/test_device.py:75: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
devolo_plc_api/device.py:151: in connect
    self._loop = asyncio.get_event_loop()
                 ^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 
0x7fc68775ba10>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/usr/lib/python3.14/asyncio/events.py:715: RuntimeError
_______________ TestDevice.test_context_manager[DeviceType.PLC] ________________

self = <tests.test_device.TestDevice object at 0x7fc687610050>
test_data = TestData(ip='192.0.2.1', hostname='device.local', 
device_info={'_dvl-deviceapi._tcp.local.': ZeroconfServiceInfo(addre..., 
properties={'Path': '1234567890abcdef', 'PlcMacAddress': 'AABBCCDDEEFF', 
'PlcTechnology': 'hpav', 'Version': 'v0'})})

    @pytest.mark.usefixtures("service_browser")
    @pytest.mark.parametrize("device_type", [DeviceType.PLC])
    def test_context_manager(self, test_data: TestData):
        """Test the sync context manager."""
>       with Device(test_data.ip) as device:
             ^^^^^^^^^^^^^^^^^^^^

tests/test_device.py:127: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
devolo_plc_api/device.py:90: in __enter__
    self.connect()
devolo_plc_api/device.py:151: in connect
    self._loop = asyncio.get_event_loop()
                 ^^^^^^^^^^^^^^^^^^^^^^^^
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <asyncio.unix_events._UnixDefaultEventLoopPolicy object at 
0x7fc68775ba10>

    def get_event_loop(self):
        """Get the event loop for the current context.
    
        Returns an instance of EventLoop or raises an exception.
        """
        if self._local._loop is None:
>           raise RuntimeError('There is no current event loop in thread %r.'
                               % threading.current_thread().name)
E           RuntimeError: There is no current event loop in thread 'MainThread'.

/usr/lib/python3.14/asyncio/events.py:715: RuntimeError
...
=========================== short test summary info ============================
FAILED tests/test_device.py::TestDevice::test_connect - RuntimeError: There i...
FAILED tests/test_device.py::TestDevice::test_context_manager[DeviceType.PLC]
============ 2 failed, 64 passed, 3 deselected, 1 warning in 3.13s =============
E: pybuild pybuild:483: test: plugin pyproject failed with: exit code=1: cd 
/build/reproducible-path/devolo-plc-api-1.5.1/.pybuild/cpython3_3.14/build; 
python3.14 -m pytest -k "not test_wrong_password_type and not test_disconnect" 
--snapshot-warn-unused
...

Reply via email to