def test_invalid_query(query: Query, exception: Exception) -> None: with pytest.raises(type(exception), match=re.escape(str(exception))): query.validate()
def test_query(query: Query) -> None: query.validate()