-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
bpo-36597: fix random doctest failure #12776
Conversation
Would you mind to close/reopen the PR to trigger a second Travis CI job, to confirm that it's not a random failure? |
The bot cannot cherry-pick directly the change, since I didn't disable doctest in the 3.7 branch. |
When I test your PR locally, I still get random failures. Commands:
Example of failure:
My venv has these versions:
|
|
I'm very surprised that the job succeed on Travis CI but fail locally. Why Travis CI doesn't get the library/statistics.rst bug for example? Extract of library/statistics.rst where the fail occurred:
This file doesn't contain "import statistics". How is doctest support to know that fmean() comes from statistics? |
There is "testsetup" directive In
|
Ah sorry, I looked for "import statistics", but the file contains:
I didn't know this markup. The doc can be found at: Doc/conf.py also contains:
|
Aaaaaah, ok :-) Sorry, I completely misunderstood how sphinx-build picks its Python. I was confused by this line from .travis.yml:
The PYTHON=../python argument is misleading: it's useless, since sphinx-build uses its "own" Python from the virtual environment... Sorry for the noise. |
Thanks @methane for the quick fix! |
https://bugs.python.org/issue36597