def test_has_min_len_fail(da1): """Test if check fails properly.""" with pytest.raises(DimensionError) as e: has_min_len(da1.values, 5, "arbitrary") assert "Your arbitrary array must be at least" in str(e.value)
def test_has_min_len_arr(da1): """Test if check works for min len.""" assert has_min_len(da1.values, 2, "arbitrary")