Skip to content

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

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

Merged
merged 4 commits into from
Mar 24, 2025

Conversation

tillahoffmann
Copy link
Contributor

@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
Contributor 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

@AA-Turner AA-Turner merged commit 5831b3e into sphinx-doc:master Mar 24, 2025
23 checks passed
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants