mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Issue #17041: Fix testing when Python is configured with the
--without-doc-strings.
This commit is contained in:
commit
26f1166510
6 changed files with 53 additions and 28 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue