'test that the initial context counts
as \'enclosing\' scope, for nested defs'

def test_scope_eight(self):

    t = Template('\n                                <%def    name="enclosing()">\n                                                <%def    name="a()">\n                                                                a:    x    is    ${x}\n                                                </%def>\n\n                                                <%def    name="b()">\n                                                                <%\n                                                                                x    =    10\n                                                                %>\n\n                                                                b.    x    is    ${x}.        ${a()}\n                                                </%def>\n\n                                                ${b()}\n                                </%def>\n                                ${enclosing()}\n                ')
    eq_(flatten_result(t.render(x=5)), 'b.    x    is    10.    a:    x    is    5')
