ludeeus / integration_blueprint

Blueprint for custom_component developers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A test tried to use socket.socket

InTheDaylight14 opened this issue · comments

Hello, I am having issues getting pytest to work with the blueprint. It gives me an error that A test tried to use socket.socket. I am running pytest tests/test_api.py on an unmodified download of the integration_blueprint and I receive the error output below. It is identical to the error I receive when running tests on the custom component I am building out. I expected the unmodified integration_blueprint to not produce the error.

FAILED tests/test_api.py::test_api - pytest_socket.SocketBlockedError: A test tried to use socket.socket.

Results (0.11s):
       1 error
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:asyncio:Using proactor: IocpProactor
DEBUG:asyncio:Using proactor: IocpProactor
Exception ignored in: <function BaseEventLoop.__del__ at 0x000001A553E5B490>
Traceback (most recent call last):
  File "~\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 682, in __del__
    self.close()
  File "~\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 686, in close
    self._close_self_pipe()
  File "~\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 754, in _close_self_pipe
    self._ssock.close()
AttributeError: 'ProactorEventLoop' object has no attribute '_ssock'

I was able to get pytest to work just fine on Ubuntu. I guess the testing just needs to be done on linux and not Windows?

Tests was removed in 15feac5 ref #83 so this is no longer needed 👍