Exemplo n.º 1
0
 def test_cv_arg2(self):
     v = "This is a {{w|test article|test value}}."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test value.")
Exemplo n.º 2
0
 def test_cv_repl1_surname(self):
     v = "This is a {{surname|from=nickname|lang=fi}}"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a surname")
Exemplo n.º 3
0
 def test_cv_repl1_taxon(self):
     v = "{{taxon|genus|family|Talpidae|[[insectivore]] mammals; typical [[mole]]s}}"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "taxonomic genus")
Exemplo n.º 4
0
 def test_cv_q3(self):
     v = "This is a '''test'''."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 5
0
 def test_cv_repl1_arg2(self):
     v = "This is a {{given name|female|lang=fi}}"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a female given name")
Exemplo n.º 6
0
 def test_cv_unk(self):
     v = "This is a {{unknown-asdxfa}} test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 7
0
 def test_cv_html2(self):
     v = "This </thispurportstobeatag> is a test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 8
0
 def test_cv_excl(self):
     v = " Run !\n"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "Run!")
Exemplo n.º 9
0
 def test_cv_ques(self):
     v = " Run ?\n"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "Run?")
Exemplo n.º 10
0
 def test_cv_sp(self):
     v = "  This\nis \na\n   test.\t"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 11
0
 def test_cv_presp(self):
     v = " This ; is a test , "
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This; is a test,")
Exemplo n.º 12
0
 def test_cv_gt(self):
     v = "This is a t\u2019est."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a t'est.")
Exemplo n.º 13
0
 def test_cv_gt(self):
     v = "This is a &lt;test&gt;."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a <test>.")
Exemplo n.º 14
0
 def test_cv_nbsp(self):
     v = "This is a&nbsp;test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 15
0
 def test_cv_arg3(self):
     v = "This is a {{w2|fi||test}}."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 16
0
 def test_cv_plain(self):
     v = "This is a test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 17
0
 def test_cv_arg_nest(self):
     v = "This is a {{w2|fi||{{given name|male}}}}."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a male given name.")
Exemplo n.º 18
0
 def test_cv_comment(self):
     v = "This <!--comment--> is a test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 19
0
 def test_cv_ref(self):
     v = "This <ref>junk\nmore junk</ref> is a test."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 20
0
 def test_cv_repl0(self):
     v = "This is 1500 {{BC}}"
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is 1500 BC")
Exemplo n.º 21
0
 def test_cv_link1(self):
     v = "This is a [[test]]."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")
Exemplo n.º 22
0
 def test_cv_htmllink(self):
     v = "This is a [http://ylonen.org test]."
     v = wiktionary.clean_value(v)
     self.assertEqual(v, "This is a test.")