def test_computed_var_with_annotation_error(request, fixture):
    """Test that an Attribute error is thrown when a non-existent attribute of an annotated computed var is
    accessed or when the wrong annotation is provided to a computed var.

    Args:
        request: Fixture Request.
        fixture: The state fixture.
    """
    with pytest.raises(AttributeError) as err:
        state = request.getfixturevalue(fixture)
        state.var_with_annotation.foo
        full_name = state.var_with_annotation._var_full_name
        assert (
            err.value.args[0]
            == f"The State var `{full_name}` has no attribute 'foo' or may have been annotated wrongly."
        )
Test that an Attribute error is thrown when a non-existent attribute of an annotated computed var is
    accessed or when the wrong annotation is provided to a computed var.

    Args:
        request: Fixture Request.
        fixture: The state fixture.
    
tests/units/test_var.py