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