Skip to content

setup_modules seems to be ignored with 8.0.1 + --doctest-modules #12040

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

Closed
skoudoro opened this issue Feb 28, 2024 · 2 comments
Closed

setup_modules seems to be ignored with 8.0.1 + --doctest-modules #12040

skoudoro opened this issue Feb 28, 2024 · 2 comments

Comments

@skoudoro
Copy link

Hi Pytest team,

In DIPY project, we use a lot setup_module and teardown_module and everything was working like a charm.

Since pytest 8.0.1 and 8.0.2, it seems that setup_module and teardown_module are incompatible with --doctest-modules flag.

All our tests fails when you add this flag due to unrecognized variable defined in setup_module.

This problem appears on Windows, Linux and macOS.

Let me know if you need more information concerning this issue. For now, we will just pin pytest to 8.0.0

Thank you for you feedback

@bluetech
Copy link
Member

This has been reported in #12011, will be fixed in pytest 8.1, which will be released soon.

If you want a quicker solution, replacing setup_module/teardown_module with a pytest fixture would do the trick.

@bluetech bluetech closed this as not planned Won't fix, can't repro, duplicate, stale Feb 28, 2024
@skoudoro
Copy link
Author

Great!, I could not find it. Thank you for the feedback @bluetech

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

No branches or pull requests

2 participants