Skip to content

Disable assertion rewriting of external modules for python_files = *.py #13403

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

Open
lucascolley opened this issue Apr 30, 2025 · 1 comment · May be fixed by #13421
Open

Disable assertion rewriting of external modules for python_files = *.py #13403

lucascolley opened this issue Apr 30, 2025 · 1 comment · May be fixed by #13421
Labels
topic: collection related to the collection phase topic: rewrite related to the assertion rewrite mechanism type: bug problem that needs to be addressed

Comments

@lucascolley
Copy link

#10845 (comment)

i think that part deserves a new issue that specifically handles that part

cc @RonnyPfannschmidt @The-Compiler

@The-Compiler
Copy link
Member

For context, from #10845 (comment):

  • pytest does assertion rewriting for everything (even third-party modules outside of the test rootdir) if python_files = *.py is set. IMHO that is a pytest bug, though I never really was deeply involved with the assertion rewriting code, so I'd love to hear what other maintainers think.

@The-Compiler The-Compiler added type: bug problem that needs to be addressed topic: collection related to the collection phase topic: rewrite related to the assertion rewrite mechanism labels May 2, 2025
@Tusenka Tusenka linked a pull request May 13, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: collection related to the collection phase topic: rewrite related to the assertion rewrite mechanism type: bug problem that needs to be addressed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants