diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index 1b20fa7aabe..23d015c15f1 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1703,7 +1703,12 @@ def case_pred(test): def _check_docstrings(): """Just used to check if docstrings are enabled""" -HAVE_DOCSTRINGS = (_check_docstrings.__doc__ is not None) +MISSING_C_DOCSTRINGS = (check_impl_detail() and + sys.platform != 'win32' and + not sysconfig.get_config_var('WITH_DOC_STRINGS')) + +HAVE_DOCSTRINGS = (_check_docstrings.__doc__ is not None and + not MISSING_C_DOCSTRINGS) requires_docstrings = unittest.skipUnless(HAVE_DOCSTRINGS, "test requires docstrings")