warns(None) is an anti-pattern, and is explicitly forbidden starting from pytest 8.0. Instead, we catch all warnings, and filter them to be errors, so they will raise an (uncaught) exception. Drive-by importing warns from pytest rather than the internal name.
warns(None) is an anti-pattern, and is explicitly forbidden starting from pytest 8.0. Instead, we catch all warnings, and filter them to be errors, so they will raise an (uncaught) exception. Drive-by importing warns from pytest rather than the internal name.