-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests
are shipped as a module with the package
#140
Comments
tests
are shipped as. module with the packagetests
are shipped as a module with the package
Opened a PR that I think should fix this here. |
Thanks for the catch. I intend to merge your PR #139 for cleaning purpose, if nothing else. Out of curiosity, how bad is it for the shipped MSAL EX 1.3.0, though? Do we have to ship this fix quick? What actual issue did you run into, @fpgmaas , @mpkuth? I did some quick tests, and it seems a project can still pick up their own
UPDATE: The example in my tests above used a
@mpkuth rightfully pointed out that the In any case, the |
@rayluo For some of my projects it breaks the CI/CD pipelines. I created a small reproducible example here. The unit tests succeed without There are some workarounds of course;
So it is not very urgent, but I still think a |
We use the same structure as the example provided by @fpgmaas. The update caused
Eventually we tracked down the wayward We worked around it by adding -from tests import utils
+from . import utils The layout we use is suggested in the |
Thanks @fpgmaas for going extra mile to set up a repo for repro. And thanks @mpkuth for rightfully pointed out that the The |
Version 1.3.1 is shipped. |
What is the problem?
tests
directory is shipped as part of the package. This can be a problem, since many projects contain atests
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 totests
in the virtual environment, and to thetests
directory in their project. This will lead to errors while running the unit tests like:The issue can be confirmed with the following steps:
This shows the following directories exist in the wheel file:
How to solve this?
tests
should not be shipped with themsal-extensions
package. Probably the linepackages=find_packages()
insetup.py
should be modified.The text was updated successfully, but these errors were encountered: