MCPcopy
hub / github.com/python-trio/trio / h

Function h

src/trio/_core/_tests/test_instrumentation.py:293–304  ·  view source on GitHub ↗
(
            self: Instrument,
            *args: object,
            hook: str = hook,
            val: tuple[bool, bool | None] = val,
        )

Source from the content-addressed store, hash-verified

291 for hook, val in hooks.items():
292
293 def h(
294 self: Instrument,
295 *args: object,
296 hook: str = hook,
297 val: tuple[bool, bool | None] = val,
298 ) -> None:
299 fail_str = f"failed in {hook}"
300
301 assert _core.in_trio_run() == val[0], fail_str
302 if val[1] is not None:
303 assert _core.in_trio_task() == val[1], fail_str
304 called.add(hook)
305
306 setattr(Instrument, hook, h)
307

Callers

nothing calls this directly

Calls 1

addMethod · 0.80

Tested by

no test coverage detected