MCPcopy Create free account
hub / github.com/python/cpython / skip_if_sanitizer

Function skip_if_sanitizer

Lib/test/support/__init__.py:475–480  ·  view source on GitHub ↗

Decorator raising SkipTest if running with a sanitizer active.

(reason=None, *, address=False, memory=False, ub=False, thread=False)

Source from the content-addressed store, hash-verified

473
474
475def skip_if_sanitizer(reason=None, *, address=False, memory=False, ub=False, thread=False):
476 """Decorator raising SkipTest if running with a sanitizer active."""
477 if not reason:
478 reason = 'not working with sanitizers active'
479 skip = check_sanitizer(address=address, memory=memory, ub=ub, thread=thread)
480 return unittest.skipIf(skip, reason)
481
482# gh-89363: True if fork() can hang if Python is built with Address Sanitizer
483# (ASAN): libasan race condition, dead lock in pthread_create().

Callers

nothing calls this directly

Calls 1

check_sanitizerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…