def METHOD_NAME(self, test_env):
    m = test_env.from_string(
        """
        {% macro toplevel() %}...{% endmacro %}
        {% macro __private() %}...{% endmacro %}
        {% set variable = 42 %}
        {% for item in [1] %}
            {% macro notthere() %}{% endmacro %}
        {% endfor %}
    """
    ).module
    assert m.toplevel() == "..."
    assert not hasattr(m, "__missing")
    assert m.variable == 42
    assert not hasattr(m, "notthere")