def test_format_part_of_speech(self): entry = LexicalEntry() entry.set_lexeme("action") entry.set_partOfSpeech("verb") expected = "\\textit{v}. " self.assertEqual(format_part_of_speech(entry, font), expected) del entry
def test_format_link(self): entry = LexicalEntry("link_0") entry.set_lexeme("link") expected = "\\hyperlink{link_01}{\\textbf{\ipa{link}}}" self.assertEqual(format_link(entry, font), expected) entry.set_homonymNumber(2) expected = "\\hyperlink{link_02}{\\textbf{\ipa{link}} \\textsubscript{2}}" self.assertEqual(format_link(entry, font), expected) del entry
def test_format_lexeme(self): entry = LexicalEntry() entry.set_lexeme("hello") expected = "\\paragraph{\\hspace{-0.5cm} \\textbf{\ipa{hello}}} \\hypertarget{01}{}\n\markboth{\\textbf{\ipa{hello}}}{}\n" self.assertEqual(format_lexeme(entry, font), expected) del entry
def test_format_uid(self): entry = LexicalEntry("link_0") entry.set_lexeme("link") expected = "\\hyperlink{link_01}{\\textbf{\ipa{link}}}" self.assertEqual(format_link(entry, font), expected) del entry