(unraisable_hook_args)
| 111 | default_hook = sys.__unraisablehook__ |
| 112 | |
| 113 | def hook(unraisable_hook_args): |
| 114 | exc_type, exc_value, exc_tb, err_msg, obj = unraisable_hook_args |
| 115 | if obj == "already_set demo": |
| 116 | nonlocal triggered |
| 117 | triggered = True |
| 118 | default_hook(unraisable_hook_args) |
| 119 | return |
| 120 | |
| 121 | # Use monkeypatch so pytest can apply and remove the patch as appropriate |
| 122 | monkeypatch.setattr(sys, "unraisablehook", hook) |
nothing calls this directly
no outgoing calls
no test coverage detected