()
| 197 | |
| 198 | |
| 199 | def test_signal_refcycle(): |
| 200 | # Test possible workaround for https://bugs.python.org/issue42248 |
| 201 | with disabled_gc(): |
| 202 | wr = exhibit_signal_refcycle() |
| 203 | if wr() is None: |
| 204 | pytest.skip( |
| 205 | "Python version does not have the bug we're testing for") |
| 206 | |
| 207 | gc.collect() |
| 208 | with disabled_gc(): |
| 209 | wr = exhibit_signal_refcycle() |
| 210 | assert wr() is not None |
| 211 | _break_traceback_cycle_from_frame(sys._getframe(0)) |
| 212 | assert wr() is None |
| 213 | |
| 214 | |
| 215 | @pytest.mark.skipif(sys.platform != "win32", |
nothing calls this directly
no test coverage detected