Adapt test for build --without-doc-strings.

This commit is contained in:
Stefan Krah 2013-01-26 13:31:44 +01:00
parent c59c85c1ac
commit 4216aa1e52
2 changed files with 6 additions and 0 deletions

View file

@ -20,6 +20,7 @@ import re
import time
import struct
import _testcapi
import sysconfig
try:
import thread
except ImportError:
@ -1111,6 +1112,10 @@ 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.