From 9d19eba6e2be9531a1404c81eccd76446bb82155 Mon Sep 17 00:00:00 2001 From: Frantisek Hrbata Date: Wed, 18 Feb 2026 09:31:05 +0100 Subject: [PATCH] fix(test_build_system): add __init__.py to buildv2 test directory Pytest's default import mode (prepend/rootdir) imports test modules as top-level modules keyed by filename. When two directories contain test files with the same basename (e.g. test_sdkconfig.py in both test_build_system/ and test_build_system/buildv2/), pytest tries to register both as the module name "test_sdkconfig". The second collection fails with "import file mismatch" because the module object already cached in sys.modules points to the first file. Adding __init__.py to the buildv2/ directory makes it a proper Python package. Pytest then imports its test modules under the package namespace (buildv2.test_sdkconfig), which is distinct from the top-level test_sdkconfig, resolving the collision. Signed-off-by: Frantisek Hrbata --- tools/test_build_system/buildv2/__init__.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tools/test_build_system/buildv2/__init__.py diff --git a/tools/test_build_system/buildv2/__init__.py b/tools/test_build_system/buildv2/__init__.py new file mode 100644 index 00000000000..e69de29bb2d