Exemplo n.º 1
0
 def test_empty_html(self):
     doc = common.MockDoc('html')
     span = pf.Span(classes=['phonfeat'])
     phonfeat.parse(span, doc)
     self.assertEqual(pf.stringify(span), '[]')
Exemplo n.º 2
0
 def test_empty_latex(self):
     doc = common.MockDoc('latex')
     span = pf.Span(classes=['phonfeat'])
     phonfeat.parse(span, doc)
     self.assertEqual(pf.stringify(span), '\\phonfeat{}')
Exemplo n.º 3
0
 def test_three_strs_latex(self):
     doc = common.MockDoc('latex')
     span = pf.Span(pf.Str('a'), pf.Str('b'), pf.Str('c'), classes=['phonfeat'])
     phonfeat.parse(span, doc)
     self.assertEqual(pf.stringify(span), '\\phonfeat{a \\\\ b \\\\ c}')
Exemplo n.º 4
0
 def test_three_strs_html(self):
     doc = common.MockDoc('html')
     span = pf.Span(pf.Str('a'), pf.Str('b'), pf.Str('c'), classes=['phonfeat'])
     phonfeat.parse(span, doc)
     self.assertEqual(pf.stringify(span), '[a, b, c]')