Beispiel #1
0
 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
Beispiel #2
0
 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
Beispiel #3
0
 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
Beispiel #4
0
 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
Beispiel #5
0
 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
Beispiel #6
0
 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
Beispiel #7
0
 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
Beispiel #8
0
 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