summaryrefslogtreecommitdiff
path: root/Doc/conf.py
diff options
context:
space:
mode:
authorStéphane Wirtel <stephane@wirtel.be>2018-10-12 09:51:05 +0200
committerJulien Palard <julien@palard.fr>2018-10-12 09:51:05 +0200
commit859c068e52a31e13e2b9bb6a3f861fa8c290cb0e (patch)
treecf422fce87737d3cbebe6cd5844fc71218a46169 /Doc/conf.py
parent53ebf4b0709f431b7262aa5daccef7eafde7383e (diff)
downloadcpython-git-859c068e52a31e13e2b9bb6a3f861fa8c290cb0e.tar.gz
bpo-34962: make doctest in Doc/ now passes, and is enforced in CI (GH-9806)
Diffstat (limited to 'Doc/conf.py')
-rw-r--r--Doc/conf.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/Doc/conf.py b/Doc/conf.py
index 7f720ce383..6060ac176c 100644
--- a/Doc/conf.py
+++ b/Doc/conf.py
@@ -16,6 +16,13 @@ sys.path.append(os.path.abspath('includes'))
extensions = ['sphinx.ext.coverage', 'sphinx.ext.doctest',
'pyspecific', 'c_annotations', 'escape4chm']
+
+doctest_global_setup = '''
+try:
+ import _tkinter
+except ImportError:
+ _tkinter = None
+'''
# General substitutions.
project = 'Python'
copyright = '2001-%s, Python Software Foundation' % time.strftime('%Y')