def test_empty_html(self): doc = common.MockDoc('html') span = pf.Span(classes=['phonfeat']) phonfeat.parse(span, doc) self.assertEqual(pf.stringify(span), '[]')
def test_empty_latex(self): doc = common.MockDoc('latex') span = pf.Span(classes=['phonfeat']) phonfeat.parse(span, doc) self.assertEqual(pf.stringify(span), '\\phonfeat{}')
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}')
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]')