'test that arguments passed to the body()
function are accessible by top-level defs'

def test_canget_kwargs(self):

    l = lookup.TemplateLookup()
    l.put_string('base', '\n\n                                ${next.body(x=12)}\n\n                                ')
    l.put_string('main', '\n                                                <%inherit    file="base"/>\n                                                <%page    args="x"/>\n                                                this    is    main.        x    is    ${x}\n\n                                                ${a()}\n\n                                                <%def    name="a(**args)">\n                                                                this    is    a,    x    is    ${x}\n                                                </%def>\n                                ')
    eq_(result_lines(l.get_template('main').render()), ['this    is    main.    x    is    12', 'this    is    a,    x    is    12'])
    l.put_string('another', '\n                                                <%namespace    name="ns"    file="main"/>\n\n                                                ${ns.body(x=15)}\n                                ')
    eq_(result_lines(l.get_template('another').render()), ['this    is    main.    x    is    15', 'this    is    a,    x    is    15'])
