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

Don't assume doctestmodules exists on Namespace #270

Closed
Carreau opened this issue Nov 21, 2024 · 1 comment · Fixed by #271
Closed

Don't assume doctestmodules exists on Namespace #270

Carreau opened this issue Nov 21, 2024 · 1 comment · Fixed by #271
Labels
Milestone

Comments

@Carreau
Copy link
Contributor

Carreau commented Nov 21, 2024

When a plugin is installed; it get called even on projects that don't use it.

In particular on some projects I get:

INTERNALERROR>   File "/Users/bussonniermatthias/miniconda3/envs/arm64/lib/python3.12/site-packages/pytest_doctestplus/plugin.py", line 212, in pytest_configure
INTERNALERROR>     run_regular_doctest = config.option.doctestmodules and not config.option.doctest_plus
INTERNALERROR>                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
INTERNALERROR> AttributeError: 'Namespace' object has no attribute 'doctestmodules'

Could we get a conditional check it exists ?

@bsipocz
Copy link
Member

bsipocz commented Nov 21, 2024

I have a vague recollection that I ran into this somewhere, so +1 to find a solution.

@bsipocz bsipocz added the bug label Nov 21, 2024
@bsipocz bsipocz added this to the 1.3.0 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants