MCPcopy Index your code
hub / github.com/python/cpython / wrapper

Function wrapper

Lib/test/support/__init__.py:391–405  ·  view source on GitHub ↗
(*args, **kw)

Source from the content-addressed store, hash-verified

389 def decorator(func):
390 @functools.wraps(func)
391 def wrapper(*args, **kw):
392 if sys.platform == 'darwin':
393 import platform
394 version_txt = platform.mac_ver()[0]
395 try:
396 version = tuple(map(int, version_txt.split('.')))
397 except ValueError:
398 pass
399 else:
400 if version < min_version:
401 min_version_txt = '.'.join(map(str, min_version))
402 raise unittest.SkipTest(
403 "Mac OS X %s or higher required, not %s"
404 % (min_version_txt, version_txt))
405 return func(*args, **kw)
406 wrapper.min_version = min_version
407 return wrapper
408 return decorator

Callers 1

Calls 14

_MemoryWatchdogClass · 0.85
force_colorFunction · 0.85
doCleanupsMethod · 0.80
skipTestMethod · 0.80
AClass · 0.70
funcFunction · 0.50
fFunction · 0.50
splitMethod · 0.45
joinMethod · 0.45
subTestMethod · 0.45
formatMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…