Beispiel #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), '[]')
Beispiel #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{}')
Beispiel #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}')
Beispiel #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]')