1. Andriy Kornatskyy
  2. wheezy.template

Commits

Andriy Kornatskyy  committed 99fe64f

Ensure the result of template generation is unicode.

  • Participants
  • Parent commits a8d0f5f
  • Branches default

Comments (0)

Files changed (1)

File demos/bigtable/bigtable.py

View file
 </table>
 """))
     def test_tornado():
-        return tornado_template.generate(**ctx)
+        return tornado_template.generate(**ctx).decode('utf8')
 
 
 # region: mako
              for name in names if name.startswith('test_')])
     for name, test in names:
         if test:
-            assert test()
+            assert isinstance(test(), s)
             t = Timer(setup='from __main__ import %s as t' % name,
                       stmt='t()')
             t = t.timeit(number=number)