pytest
aarch64-darwin.devShell-default
· build #1
· raw
1Sourcing pytest-check-hook2Using pytestCheckPhase3============================= test session starts ==============================4platform darwin -- Python 3.12.5, pytest-8.3.2, pluggy-1.5.05rootdir: /nix/var/nix/builds/nix-36017-7520906236configfile: pyproject.toml7plugins: asyncio-0.23.88asyncio: mode=Mode.STRICT9collected 4 items 1011tests/test_hostname_sign_verify.py . [ 25%]12tests/test_merge.py . [ 50%]13tests/test_save_load.py . [ 75%]14tests/test_server.py F [100%]1516=================================== FAILURES ===================================17_________________________________ test_server __________________________________1819temporary_dir = PosixPath('/nix/var/nix/builds/nix-36017-752090623/tmp794yne1m')20unused_tcp_port_factory = <function unused_tcp_port_factory.<locals>.factory at 0x104f55580>21aiohttp_server = <function aiohttp_server.<locals>.go at 0x104f558a0>2223 @pytest.mark.asyncio24 async def test_server(25 temporary_dir: Path,26 unused_tcp_port_factory: Callable[[], int],27 aiohttp_server: Callable,28 ) -> None:29 logging.basicConfig(level=logging.DEBUG)30 log.info("Starting test")31 32 state1 = temporary_dir / "state1.json"33 key1 = SigningKey.generate()34> s1_port = unused_tcp_port_factory()3536tests/test_server.py:56: 37_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 38/nix/store/mdqfxvsijn4z8a7rk0jn5nxl503wa7jp-python3.12-pytest-asyncio-0.23.8/lib/python3.12/site-packages/pytest_asyncio/plugin.py:1037: in factory39 port = _unused_port(socket.SOCK_STREAM)40_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 4142socket_type = <SocketKind.SOCK_STREAM: 1>4344 def _unused_port(socket_type: int) -> int:45 """Find an unused localhost port from 1024-65535 and return it."""46 with contextlib.closing(socket.socket(type=socket_type)) as sock:47> sock.bind(("127.0.0.1", 0))48E PermissionError: [Errno 1] Operation not permitted4950/nix/store/mdqfxvsijn4z8a7rk0jn5nxl503wa7jp-python3.12-pytest-asyncio-0.23.8/lib/python3.12/site-packages/pytest_asyncio/plugin.py:1016: PermissionError51------------------------------ Captured log setup ------------------------------52DEBUG: Using selector: KqueueSelector53 /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__54DEBUG: Using selector: KqueueSelector55 /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__56------------------------------ Captured log call -------------------------------57INFO: Starting test58 /nix/var/nix/builds/nix-36017-752090623/tests/test_server.py:52::test_server59---------------------------- Captured log teardown -----------------------------60DEBUG: Using selector: KqueueSelector61 /nix/store/9pj4rzx5pbynkkxq1srzwjhywmcfxws3-python3-3.12.5/lib/python3.12/asyncio/selector_events.py:64::__init__62=========================== short test summary info ============================63FAILED tests/test_server.py::test_server - PermissionError: [Errno 1] Operation not permitted64========================= 1 failed, 3 passed in 1.07s ==========================