Sourcing pytest-check-hook Using pytestCheckPhase ============================= test session starts ============================== platform darwin -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.0 rootdir: /nix/var/nix/builds/nix-36017-752090623 configfile: pyproject.toml plugins: asyncio-0.23.8 asyncio: mode=Mode.STRICT collected 4 items tests/test_hostname_sign_verify.py . [ 25%] tests/test_merge.py . [ 50%] tests/test_save_load.py . [ 75%] tests/test_server.py F [100%] =================================== FAILURES =================================== _________________________________ test_server __________________________________ temporary_dir = PosixPath('/nix/var/nix/builds/nix-36017-752090623/tmp794yne1m') unused_tcp_port_factory = .factory at 0x104f55580> aiohttp_server = .go at 0x104f558a0> @pytest.mark.asyncio async def test_server( temporary_dir: Path, unused_tcp_port_factory: Callable[[], int], aiohttp_server: Callable, ) -> None: logging.basicConfig(level=logging.DEBUG) log.info("Starting test") state1 = temporary_dir / "state1.json" key1 = SigningKey.generate() > s1_port = unused_tcp_port_factory() tests/test_server.py:56: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ /nix/store/mdqfxvsijn4z8a7rk0jn5nxl503wa7jp-python3.12-pytest-asyncio-0.23.8/lib/python3.12/site-packages/pytest_asyncio/plugin.py:1037: in factory port = _unused_port(socket.SOCK_STREAM) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ socket_type = def _unused_port(socket_type: int) -> int: """Find an unused localhost port from 1024-65535 and return it.""" with contextlib.closing(socket.socket(type=socket_type)) as sock: > sock.bind(("127.0.0.1", 0)) E PermissionError: [Errno 1] Operation not permitted /nix/store/mdqfxvsijn4z8a7rk0jn5nxl503wa7jp-python3.12-pytest-asyncio-0.23.8/lib/python3.12/site-packages/pytest_asyncio/plugin.py:1016: PermissionError ------------------------------ Captured log setup ------------------------------ DEBUG: Using selector: KqueueSelector /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__ DEBUG: Using selector: KqueueSelector /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__ ------------------------------ Captured log call ------------------------------- INFO: Starting test /nix/var/nix/builds/nix-36017-752090623/tests/test_server.py:52::test_server ---------------------------- Captured log teardown ----------------------------- DEBUG: Using selector: KqueueSelector /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__ =========================== short test summary info ============================ FAILED tests/test_server.py::test_server - PermissionError: [Errno 1] Operation not permitted ========================= 1 failed, 3 passed in 1.07s ==========================