(f)
| 94 | |
| 95 | |
| 96 | def ignore_pytest_unraisable_warning(f): |
| 97 | unraisable = "PytestUnraisableExceptionWarning" |
| 98 | if hasattr(pytest, unraisable): # Python >= 3.8 and pytest >= 6 |
| 99 | dec = pytest.mark.filterwarnings(f"ignore::pytest.{unraisable}") |
| 100 | return dec(f) |
| 101 | return f |
| 102 | |
| 103 | |
| 104 | # TODO: find out why this fails on PyPy, https://foss.heptapod.net/pypy/pypy/-/issues/3583 |