Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(6)  |  Derive(0)  |  Import(0)

src/t/e/templess-0.3/test/test_templess_functional.py   templess(Download)
def setup_module(mod):
    t = (py.magic.autopath().dirpath() /
                    'templates/testtemplate.html').open()
    template = templess.template(t)
    mod.rendered = rendered = template.unicode(context)
        fp.close()
    data = unicode(data, 'UTF-8').encode('latin-1')
    template = templess.template(data, 'latin-1')
    html = template.unicode(context)
    # the interpolated föö is in a <p>
            '<baz t:content="baz" /><qux t:content="qux" />'
            '</bar></foo>')
    template = templess.template(xml)
    rendered = template.unicode(
        {'bars':[

src/t/e/templess-0.3/test/speedtest.py   templess(Download)
def test_simple():
    template = templess.template(open('%s/templates/simple.html' % (tpath,)))
    template.render_to_string(context)
 
def test_test_context():
    # we reload here because the test context has another template 
    # instantiation inside it for the macro
    reload(test_templess_functional)
    t = open('%s/templates/testtemplate.html' % (tpath,))
    template = templess.template(t)

src/t/e/templess-0.3/test/oneshot.py   templess(Download)
def main():
    t = (py.magic.autopath().dirpath() /
                'templates/testtemplate.html').open()
    template = templess.template(t)
    rendered = template.unicode(context)