def test_extract_state_from_container(value, expect_state):
    """Test that _var_state is extracted from containers containing BaseVar.

    Args:
        value: The value to create a var from.
        expect_state: The expected state.
    """
    var_data = LiteralVar.create(value)._get_all_var_data()
    var_state = var_data.state if var_data else ""
    assert var_state == expect_state
Test that _var_state is extracted from containers containing BaseVar.

    Args:
        value: The value to create a var from.
        expect_state: The expected state.
    
tests/units/test_var.py