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