Example #1
0
def _normparse(text):
    """Parse a template and then normalize the resulting Expression."""
    return _normexpr(functemplate._parse(text))
Example #2
0
def _normparse(text):
    """Parse a template and then normalize the resulting Expression."""
    return _normexpr(functemplate._parse(text))
Example #3
0
 def test_fail_on_utf8(self):
     parts = u'é'.encode('utf8')
     warnings.simplefilter("ignore")
     with self.assertRaises(UnicodeDecodeError):
         functemplate._parse(parts)
     warnings.simplefilter("default")
Example #4
0
 def test_fail_on_utf8(self):
     parts = u'é'.encode('utf8')
     warnings.simplefilter("ignore")
     with self.assertRaises(UnicodeDecodeError):
         functemplate._parse(parts)
     warnings.simplefilter("default")