def test_fstring_roundtrip(value):
    """Test that f-string roundtrip carries state.

    Args:
        value: The value to create a Var from.
    """
    var = Var(_js_expr=value)._var_set_state("state")
    rt_var = LiteralVar.create(f"{var}")
    assert var._var_state == rt_var._var_state
    assert str(rt_var) == str(var)
Test that f-string roundtrip carries state.

    Args:
        value: The value to create a Var from.
    
tests/units/test_var.py