From 294c1a108e92b601ee1a72019edf5bb1b1003fdd Mon Sep 17 00:00:00 2001 From: puddly <32534428+puddly@users.noreply.github.com> Date: Fri, 25 Oct 2024 15:37:29 -0400 Subject: [PATCH] Patch the default pin factory in `test_connect` --- tests/test_uart.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_uart.py b/tests/test_uart.py index 824a2db..463692b 100644 --- a/tests/test_uart.py +++ b/tests/test_uart.py @@ -22,6 +22,8 @@ def gw(): ("/dev/null", "pizigate:/dev/ttyAMA0"), ) async def test_connect(port, monkeypatch): + monkeypatch.setattr(gpiozero.Device, "_default_pin_factory", MagicMock()) + api = MagicMock() async def mock_conn(loop, protocol_factory, url, **kwargs):