Skip to content

bpo-35240: Travis CI runs doctest without XVFB_RUN#10752

Closed
vstinner wants to merge 1 commit intopython:masterfrom
vstinner:doctest
Closed

bpo-35240: Travis CI runs doctest without XVFB_RUN#10752
vstinner wants to merge 1 commit intopython:masterfrom
vstinner:doctest

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Nov 27, 2018

@vstinner
Copy link
Member Author

I don't see the point of running "make doctest" with xvfb-run.

I guess that it was copied/pasted when "make doctest" has been added to Travis CI by @matrixise in .travis.yml: commit 859c068.

To run the Python test suite, xvfb-run makes sense since multiple tests run a GUI.

@vstinner
Copy link
Member Author

Oh, doctest failed on Travis CI :-(

Warning, treated as error:
**********************************************************************
Line 12, in default (setup code)
Failed example:
    from turtle import *
    turtle = Turtle()
Exception raised:
    Traceback (most recent call last):

@JulienPalard
Copy link
Member

The current make doctest needs an X server to test turtle so this PR is currently failing with:

    _tkinter.TclError: no display name and no $DISPLAY environment variable

But this can be gracefully muted, like we're currently disabling those same tests when we can't import tkinter, in Docs/config.py check for:

doctest_global_setup = '''
try:
    import _tkinter
except ImportError:
    _tkinter = None
'''

@vstinner
Copy link
Member Author

I was wrong. PR #10753 seems to be a better option.

@vstinner vstinner closed this Nov 27, 2018
@vstinner vstinner deleted the doctest branch November 27, 2018 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants