From ef3a25a6268005f410185af599de5215e8bd3bdb Mon Sep 17 00:00:00 2001 From: Taimoor Zaeem Date: Wed, 17 Sep 2025 18:17:29 +0500 Subject: [PATCH] test(io): remove unused duplicate freeport() function Signed-off-by: Taimoor Zaeem --- test/io/util.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/io/util.py b/test/io/util.py index 7a0610003..ba655c83b 100644 --- a/test/io/util.py +++ b/test/io/util.py @@ -24,14 +24,6 @@ class Thread(threading.Thread): raise self._exception -def freeport(): - "Find a free port on localhost." - with contextlib.closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as s: - s.bind(("", 0)) - s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) - return s.getsockname()[1] - - def authheader(token): "Bearer token HTTP authorization header." return {"Authorization": f"Bearer {token}"}