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

Add doctest_fail_fast option to exit after the first failed test. #13332

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

tillahoffmann
Copy link

@tillahoffmann tillahoffmann commented Feb 12, 2025

This PR adds a doctest_fail_fast option for the doctest extension. When the flag is set, the doctest builder exits on the first failure it encounters. This behavior mirrors pytest -x to exit on the first failed test.

@tillahoffmann tillahoffmann force-pushed the doctest_fail_fast branch 4 times, most recently from 60b755e to 18fb721 Compare February 13, 2025 01:33
@AA-Turner AA-Turner added this to the 8.3.0 milestone Mar 1, 2025
@tillahoffmann
Copy link
Author

Thanks for the review, @AA-Turner!

It looks like there are now a few failing tests for 3.13 because the pathlib module is organized differently. Do you know how I might be able to fix that?

~ docker run --rm python:3.14-rc python -c 'import pathlib; print(pathlib.Path)'
<class 'pathlib.Path'>~ docker run --rm python:3.13 python -c 'import pathlib; print(pathlib.Path)'
<class 'pathlib._local.Path'>

@AA-Turner
Copy link
Member

It looks like there are now a few failing tests for 3.13 because the pathlib module is organized differently. Do you know how I might be able to fix that?

Fixed in e01e42f, thanks for alerting me to the problem.

A

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.

None yet

2 participants