Beispiel #1
0
def _normparse(text):
    """Parse a template and then normalize the resulting Expression."""
    return _normexpr(functemplate._parse(text))
Beispiel #2
0
def _normparse(text):
    """Parse a template and then normalize the resulting Expression."""
    return _normexpr(functemplate._parse(text))
Beispiel #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")
Beispiel #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")