mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
- Issue #17041: Fix testing when Python is configured with the
--without-doc-strings option.
This commit is contained in:
parent
6d3a8605a5
commit
72121c6c30
6 changed files with 44 additions and 16 deletions
|
@ -1112,10 +1112,6 @@ def requires_resource(resource):
|
|||
else:
|
||||
return unittest.skip("resource {0!r} is not enabled".format(resource))
|
||||
|
||||
requires_docstrings = unittest.skipUnless(
|
||||
sysconfig.get_config_var('WITH_DOC_STRINGS'),
|
||||
"test requires docstrings")
|
||||
|
||||
def cpython_only(test):
|
||||
"""
|
||||
Decorator for tests only applicable on CPython.
|
||||
|
@ -1193,6 +1189,16 @@ def run_unittest(*classes):
|
|||
suite.addTest(unittest.makeSuite(cls))
|
||||
_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