()
| 187 | |
| 188 | |
| 189 | def exhibit_signal_refcycle(): |
| 190 | # Put an object in the frame locals and return a weakref to it. |
| 191 | # If `signal.getsignal` has a bug where it creates a reference cycle |
| 192 | # keeping alive the current execution frames, `obj` will not be |
| 193 | # destroyed immediately when this function returns. |
| 194 | obj = set() |
| 195 | signal.getsignal(signal.SIGINT) |
| 196 | return weakref.ref(obj) |
| 197 | |
| 198 | |
| 199 | def test_signal_refcycle(): |
no outgoing calls
no test coverage detected