`tests` are shipped as a module with the package
envgap__AzureAD__microsoft-authentication-extensions-for-python-140
01 / FAILURE SIGNATURE
As reported upstream
ModuleNotFoundError: No module named 'tests.utils'
Not a benchmark task.
- The project already builds and runs before the fix, so there is nothing to repair.
02 / ENVIRONMENT RECIPE
- Base commit
4b90cc82f8df44557c846939582b86ff1ffb41e0- Manifest
setup.py- Reproduce
Awaiting issue-specific recipe- Run under trace
Awaiting a meaningful runtime command
03 / ORIGINAL ISSUE TEXT
AzureAD/microsoft-authentication-extensions-for-python #140 · read the original issue
## What is the problem? `tests` directory is shipped as part of the package. This can be a problem, since many projects contain a `tests` directory themselves. For example, this can be a problem for projects that import from their tests directory while running the tests. The reason for this is that the module `tests` is now ambiguous; it refers both to `tests` in the virtual environment, and to the `tests` directory in their project. This will lead to errors while running the unit tests like: ``` ModuleNotFoundError: No module named 'tests.utils' ``` The issue can be confirmed with the following steps: ```sh pip download --no-deps --only-binary=:all: msal-extensions==1.3.0 unzip msal_extensions-1.3.0-py3-none-any.whl -d extracted_wheel ls -1 extracted_wheel ``` This shows the following directories exist in the wheel file: ``` msal_extensions msal_extensions-1.3.0.dist-info tests ``` ## How to solve this? `tests` should not be shipped with the `msal-extensions` package. Probably the line `packages=find_packages()` in `setup.py` should be modified.
04 / LABELS
Labels from the report text only; not yet run
No supported category has been assigned.
Label rules and the text that matched
[]