'test defs calling each other'

def test_inter_def(self):

    template = Template('\n                                ${b()}\n\n                                <%def    name="a()">                                im    a\n                                </%def>\n\n                                <%def    name="b()">\n                                im    b\n                                and    heres    a:        ${a()}\n                                </%def>\n\n                                <%def    name="c()">\n                                im    c\n                                </%def>\n')
    if compat.py3k:
        assert ('a' not in template.module.render_c.__code__.co_varnames)
        assert ('a' in template.module.render_b.__code__.co_varnames)
    else:
        assert ('a' not in template.module.render_c.func_code.co_varnames)
        assert ('a' in template.module.render_b.func_code.co_varnames)
    eq_(flatten_result(template.render()), 'im    b    and    heres    a:    im    a')
