astropy / astropy/sphinx-automodapi

First call to 'sphinx-build -b doctest' does not test generated documents.

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
67
Forks
48
Avg merge
11h 52m
Merged PRs (30d)
1

Description

As the title says, you would have to execute `sphinx-build -b doctest` (or `make doctest`) twice if you want to run all your tests starting from a fresh environment (e.g. with a CI pipeline):
```zsh
% rm -r build api/autogen
% sphinx-build -b doctest . build|grep 'tests$'
425 tests
0 failures in tests
% sphinx-build -b doctest . build|grep 'tests$'
740 tests
0 failures in tests
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the clean-environment case with `rm -r build api/autogen` and the first `sphinx-build -b doctest . build` or `make doctest` run. Trace the Sphinx doctest build and generated `api/autogen` output; done means one fresh invocation discovers and runs all generated-document tests, matching the second run's 740 tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.