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