mirror of
https://github.com/espressif/esp-idf.git
synced 2026-09-22 13:01:16 +03:00
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 <frantisek.hrbata@espressif.com>
0 lines
0 B
Python
0 lines
0 B
Python
The file is empty.