def test_typechecking(self): from _pytest.recwarn import WarningsChecker with pytest.raises(TypeError): WarningsChecker(5) with pytest.raises(TypeError): WarningsChecker(('hi', RuntimeWarning)) with pytest.raises(TypeError): WarningsChecker([DeprecationWarning, RuntimeWarning])
def test_typechecking(self) -> None: from _pytest.recwarn import WarningsChecker with pytest.raises(TypeError): WarningsChecker(5, _ispytest=True) # type: ignore[arg-type] with pytest.raises(TypeError): WarningsChecker(("hi", RuntimeWarning), _ispytest=True) # type: ignore[arg-type] with pytest.raises(TypeError): WarningsChecker([DeprecationWarning, RuntimeWarning], _ispytest=True) # type: ignore[arg-type]
def test_typechecking(self) -> None: from _pytest.recwarn import WarningsChecker with pytest.raises(TypeError): WarningsChecker(5) # type: ignore with pytest.raises(TypeError): WarningsChecker(("hi", RuntimeWarning)) # type: ignore with pytest.raises(TypeError): WarningsChecker([DeprecationWarning, RuntimeWarning]) # type: ignore