diff options
author | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-26 12:20:43 (GMT) |
---|---|---|
committer | Nick Coghlan <ncoghlan@gmail.com> | 2013-10-26 12:20:43 (GMT) |
commit | 561eb5cbe4179c39d72855b4c91171be94787380 (patch) | |
tree | 657a3ffe38a731ff5dbf5f6ffeb6d984193bbbd2 /Lib/test/support | |
parent | 40820f8fbaa3e889ad4f95f6417b0c5a9e3099d6 (diff) | |
download | cpython-561eb5cbe4179c39d72855b4c91171be94787380.zip cpython-561eb5cbe4179c39d72855b4c91171be94787380.tar.gz cpython-561eb5cbe4179c39d72855b4c91171be94787380.tar.bz2 |
Issue #19330: Handle the no-docstrings case in tests
Diffstat (limited to 'Lib/test/support')
-rw-r--r-- | Lib/test/support/__init__.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d4f7566..1b20fa7 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1697,9 +1697,13 @@ def run_unittest(*classes): #======================================================================= # 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')) +# Rather than trying to enumerate all the cases where docstrings may be +# disabled, we just check for that directly + +def _check_docstrings(): + """Just used to check if docstrings are enabled""" + +HAVE_DOCSTRINGS = (_check_docstrings.__doc__ is not None) requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS, "test requires docstrings") |