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

Function _can_strace

Lib/test/support/strace_helper.py:180–188  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

178# Moderately expensive (spawns a subprocess), so share results when possible.
179@cache
180def _can_strace():
181 res = strace_python("import sys; sys.exit(0)",
182 # --trace option needs strace 5.5 (gh-133741)
183 ["--trace=%process"],
184 check=False)
185 if res.strace_returncode == 0 and res.python_returncode == 0:
186 assert res.events(), "Should have parsed multiple calls"
187 return True
188 return False
189
190
191def requires_strace():

Callers 1

requires_straceFunction · 0.85

Calls 2

strace_pythonFunction · 0.85
eventsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…