diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-27 18:03:39 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-01-27 18:03:39 (GMT) |
commit | 26f116651030c77c93f0a98026baf7812963a30c (patch) | |
tree | 474015b8b08aa48ab9eeca569cb22109f0028f08 /Lib/test/support.py | |
parent | 60cc32382f0a568723da8cb3c1b3fc532ab41d58 (diff) | |
parent | 9d0add0c7e513a92ee4321aa5be70121c4c1e1e7 (diff) | |
download | cpython-26f116651030c77c93f0a98026baf7812963a30c.zip cpython-26f116651030c77c93f0a98026baf7812963a30c.tar.gz cpython-26f116651030c77c93f0a98026baf7812963a30c.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.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Lib/test/support.py b/Lib/test/support.py index d44436b..d89e172 100644 --- a/Lib/test/support.py +++ b/Lib/test/support.py @@ -590,10 +590,6 @@ requires_bz2 = unittest.skipUnless(bz2, 'requires bz2') requires_lzma = unittest.skipUnless(lzma, 'requires lzma') -requires_docstrings = unittest.skipUnless( - sysconfig.get_config_var('WITH_DOC_STRINGS'), - "test requires docstrings") - is_jython = sys.platform.startswith('java') # Filename used for testing @@ -1592,6 +1588,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. |