Skip to content

Commit

Permalink
added unit test for variety of species.
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrasca committed Dec 9, 2015
1 parent 37a46d2 commit e9ff63b
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,4 @@ docs/_build/
target/
*~
*/*~
*/*/*~
*/*/*~
13 changes: 12 additions & 1 deletion tests/taxonlist2json_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@

class BinomialToDictTest(unittest.TestCase):

def test_binomial_to_dict__varietas_with_author(self):
s = 'Abutilon amplissimum var. subpeltata Ktze.'
result = taxonlist2json.binomial_to_dict(s)
expect = {'object': 'taxon',
'rank': 'varietas', # should decide name of rank
'ht-rank': 'species',
'epithet': 'subpeltata',
'ht-epithet': 'Abutilon amplissimum', # COMMENT THIS
'author': "Ktze.",
}
self.assertEquals(result, expect)

def test_binomial_to_dict__with_simple_author(self):
s = ' Abuta velutina Gleason'
result = taxonlist2json.binomial_to_dict(s)
Expand Down Expand Up @@ -196,7 +208,6 @@ def test_import_ars_grin_family__with_synonym(self):
}
}
self.assertEquals(result, expect)
1/0

def test_import_ars_grin_family__illegitimus(self):
s = '''<i>Abaminaceae</i> J. Agardh, nom. illeg.</h1>
Expand Down

0 comments on commit e9ff63b

Please sign in to comment.