Esempio n. 1
0
 def test_parse_genus_and_descriptor(self):
     string = "genus (descriptor)"
     expected = {
         "genus name": "genus",
         "non-taxa descriptor": "(descriptor)",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 2
0
 def test_parse_genus_modifier(self):
     string = "? genus"
     expected = {
         "genus modifier": "?",
         "genus name": "genus",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 3
0
 def test_parse_parenthesis(self):
     string = "text1 (text2) text3"
     expected = {
         "genus name": "text1",
         "species name": "(text2)",
         "subspecies name": "text3",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 4
0
 def test_parse_long_text(self):
     string = "text1 text2 text3 text4 text5"
     expected = {
         "genus name": "text1",
         "species name": "text2",
         "subspecies name": "text3",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 5
0
 def test_parse_species_modifier(self):
     string = "genus cf. species"
     expected = {
         "genus name": "genus",
         "species modifier": "cf.",
         "species name": "species",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 6
0
 def test_parse_genus_species_subspecies(self):
     string = "genus species subspecies"
     expected = {
         "genus name": "genus",
         "species name": "species",
         "subspecies name": "subspecies",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 7
0
 def test_parse_genus_and_species_modifier_and_descriptor(self):
     string = "? genus cf. species (descriptor)"
     expected = {
         "genus modifier": "?",
         "genus name": "genus",
         "species modifier": "cf.",
         "species name": "species",
         "non-taxa descriptor": "(descriptor)",
     }
     assert taxon_name_parser(string) == expected
Esempio n. 8
0
 def test_parse_genus(self):
     string = "genus"
     expected = {"genus name": "genus"}
     assert taxon_name_parser(string) == expected