summaryrefslogtreecommitdiffstats
path: root/Lib/test/support.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2013-01-27 17:47:45 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2013-01-27 17:47:45 (GMT)
commit9d0add0c7e513a92ee4321aa5be70121c4c1e1e7 (patch)
treea61b0d0c5ee1c4c727bb55754b505cd59ecc0446 /Lib/test/support.py
parent6f02ea02c881e06029e8d44a5414682bc4b65fb8 (diff)
downloadcpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.zip
cpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.tar.gz
cpython-9d0add0c7e513a92ee4321aa5be70121c4c1e1e7.tar.bz2
Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
Diffstat (limited to 'Lib/test/support.py')
-rw-r--r--Lib/test/support.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py
index 2130fd6..66ddf4b 100644
--- a/Lib/test/support.py
+++ b/Lib/test/support.py
@@ -1477,6 +1477,16 @@ def run_unittest(*classes):
_filter_suite(suite, case_pred)
_run_suite(suite)
+#=======================================================================
+# Check for the presence of docstrings.
+
+HAVE_DOCSTRINGS = (check_impl_detail(cpython=False) or
+ sys.platform == 'win32' or
+ sysconfig.get_config_var('WITH_DOC_STRINGS'))
+
+requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS,
+ "test requires docstrings")
+
#=======================================================================
# doctest driver.