MCPcopy Index your code
hub / github.com/RustPython/RustPython / _can_strace

Function _can_strace

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

Source from the content-addressed store, hash-verified

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

Callers 1

requires_straceFunction · 0.85

Calls 2

strace_pythonFunction · 0.85
eventsMethod · 0.80

Tested by

no test coverage detected