[New-bugs-announce] [issue36597] Travis CI: doctest failure

STINNER Victor report at bugs.python.org
Wed Apr 10 22:49:25 EDT 2019


New submission from STINNER Victor <vstinner at redhat.com>:

On my https://github.com/python/cpython/pull/12770 the doctest job of Travis CI failed with:

https://travis-ci.org/python/cpython/jobs/518572326

mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest 
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
/home/travis/build/python/cpython/Doc/tools/extensions/pyspecific.py:274: RemovedInSphinx30Warning: env.note_versionchange() is deprecated. Please use ChangeSetDomain.note_changeset() instead.
  env.note_versionchange('deprecated', version[0], node, self.lineno)
Warning, treated as error:
**********************************************************************
File "library/unittest.mock-examples.rst", line ?, in default
Failed example:
    m.one().two().three()
Expected:
    <MagicMock name='mock.one().two().three()' id='...'>
Got:
    obj dead or exiting
    <MagicMock name='mock.one().two().three()' id='140222049958880'>
Makefile:44: recipe for target 'build' failed
make[1]: *** [build] Error 2

--

I can reproduce this issue on Linux with:

$ cd Doc
$ make venv
$ PATH=./venv/bin:$PATH sphinx-build -b doctest -d build/doctrees -D latex_elements.papersize= -q -W -j4 -W . build/doctest 

I get random errors:

Warning, treated as error:
**********************************************************************
File "library/datetime.rst", line 686, in default
Failed example:
    d.strftime("%A %d. %B %Y")
Expected:
    'Monday 11. March 2002'
Got:
    'lundi 11. mars 2002'

Warning, treated as error:
**********************************************************************
File "library/collections.rst", line 914, in default
Failed example:
    p._asdict()
Expected:
    {'x': 11, 'y': 22}
Got:
    OrderedDict([('x', 11), ('y', 22)])

Warning, treated as error:
**********************************************************************
File "library/unittest.mock.rst", line ?, in default
Failed example:
    mock.call_args.args
Expected:
    (3, 4)
Got:
    args


The virtual environment uses Sphinx 2.0.1. Can it be a change in Sphinx 2 default configuration?

----------
assignee: docs at python
components: Documentation
messages: 339919
nosy: docs at python, vstinner
priority: normal
severity: normal
status: open
title: Travis CI: doctest failure
versions: Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36597>
_______________________________________


More information about the New-bugs-announce mailing list