Skip to content
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

Adding a non regression test for #9765 #11725

Closed

Conversation

fcharras
Copy link
Contributor

@fcharras fcharras commented Dec 19, 2023

Non regression test for #9765

The test is expected to fail here, and to be fixed in #11708 .

Note that the test does not reproduce directly the cause of #9765 but is a best effort at reproducing the mechanism. In #9765 we were surprised of the formatting of mod.__file__ because it differs from str(conftestpath) although str(conftestpath) has not been altered.

Here we trigger an issue by submitting an altered conftestpath although mod.__file__ most likely would have the expected value. It does not reproduce the crash linked to double loading, but instead highlights that modules that should have been the same are in fact different.

I haven't found any documentation or PEP that says how mod.__file__ can be expected to be formatted, so in fact we could expect it to have any weird formatting as long as it resolves to str(conftestpath) so I think it is correct to run _importconftest once more with the original input like proposed in this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants