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

Function refcount_test

Lib/test/support/__init__.py:1434–1442  ·  view source on GitHub ↗

Decorator for tests which involve reference counting. To start, the decorator does not run the test if is not run by CPython. After that, any trace function is unset during the test to prevent unexpected refcounts caused by the trace function.

(test)

Source from the content-addressed store, hash-verified

1432
1433
1434def refcount_test(test):
1435 """Decorator for tests which involve reference counting.
1436
1437 To start, the decorator does not run the test if is not run by CPython.
1438 After that, any trace function is unset during the test to prevent
1439 unexpected refcounts caused by the trace function.
1440
1441 """
1442 return no_tracing(cpython_only(test))
1443
1444
1445def requires_limited_api(test):

Callers

nothing calls this directly

Calls 2

no_tracingFunction · 0.85
cpython_onlyFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…