From d45219994e485543458377b796f5e532d094a516 Mon Sep 17 00:00:00 2001 From: Hermenix Date: Fri, 2 Oct 2026 18:07:48 +0000 Subject: [PATCH] tests: make the test basenames unique so the whole tree collects The union of main and the four slices cannot be collected by pytest: an import-file-mismatch on test_protocol.py (the frame wire's, the broker's) and test_server.py (the frame server's, the pointer driver's). Per-directory runs never hit it, so this is what the union run is for. The tempting fix is --import-mode=importlib, and it is wrong: importlib does not put a test file's directory on sys.path, which the slices' tests rely on for sibling imports (from conftest import HANG, from test_ops import RecordingSink). That trades a collection error for an ImportError. Renaming the two colliding modules keeps the import behaviour and fixes the actual problem: tests/pointer/test_server.py -> test_pointer_server.py tests/sessions/unit/test_protocol.py -> test_broker_protocol.py tests: 551 passed. --- pyproject.toml | 2 +- tests/pointer/{test_server.py => test_pointer_server.py} | 0 .../sessions/unit/{test_protocol.py => test_broker_protocol.py} | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename tests/pointer/{test_server.py => test_pointer_server.py} (100%) rename tests/sessions/unit/{test_protocol.py => test_broker_protocol.py} (100%) diff --git a/pyproject.toml b/pyproject.toml index 95b3ead..0e8c0f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,4 +26,4 @@ hhstreamd = "hhstreamd.__main__:main" hhstream-pointer = "hhstream_pointer.__main__:main" [tool.setuptools.packages.find] -where = ["src"] \ No newline at end of file +where = ["src"] diff --git a/tests/pointer/test_server.py b/tests/pointer/test_pointer_server.py similarity index 100% rename from tests/pointer/test_server.py rename to tests/pointer/test_pointer_server.py diff --git a/tests/sessions/unit/test_protocol.py b/tests/sessions/unit/test_broker_protocol.py similarity index 100% rename from tests/sessions/unit/test_protocol.py rename to tests/sessions/unit/test_broker_protocol.py