bundles / numpy 2.4.4 / numpy / testing / _private / utils / assert_no_gc_cycles
function
numpy.testing._private.utils:assert_no_gc_cycles
Signature
def assert_no_gc_cycles ( * args , ** kwargs ) Summary
Fail if the given callable produces any reference cycles.
Extended Summary
If called with all arguments omitted, may be used as a context manager
with assert_no_gc_cycles(): do_something()
Parameters
func: callableThe callable to test.
\*args: ArgumentsArguments passed to func.
\*\*kwargs: KwargsKeyword arguments passed to func.
Returns
: Nothing. The result is deliberately discarded to ensure that all cycles: are found.
Aliases
-
numpy.testing.assert_no_gc_cycles