MCPcopy Create free account
hub / github.com/numpy/numpy / wrapper

Function wrapper

numpy/testing/_private/utils.py:2393–2402  ·  view source on GitHub ↗
(*a, **kw)

Source from the content-addressed store, hash-verified

2391 def decorator(func):
2392 @wraps(func)
2393 def wrapper(*a, **kw):
2394 msg = check_free_memory(free_bytes)
2395 if msg is not None:
2396 pytest.skip(msg)
2397
2398 try:
2399 return func(*a, **kw)
2400 except MemoryError:
2401 # Probably ran out of memory regardless: don't regard as failure
2402 pytest.xfail("MemoryError raised")
2403
2404 return wrapper
2405

Callers

nothing calls this directly

Calls 2

check_free_memoryFunction · 0.85
funcFunction · 0.50

Tested by

no test coverage detected