Skip to content

Commit

Permalink
added tests for empty strings and white space
Browse files Browse the repository at this point in the history
  • Loading branch information
kyokukou committed Jul 3, 2024
1 parent bd1347b commit f14e702
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions arxiv/taxonomy/taxonomy_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,10 @@ def test_bad_objects(self):
self.assertEqual(arch.full_name, arch.get_canonical().full_name, "name data should be retained after canonical calls")

def test_all_cats_from_string(self):
#empty string
self.assertEqual(get_all_cats_from_string(""),([],[]), "empty string doesn't cause error")
self.assertEqual(get_all_cats_from_string(" "),([],[]), "white space doesn't cause error")

#basic
expected=([ARCHIVES["hep-lat"]], [CATEGORIES["hep-lat"]])
self.assertEqual(get_all_cats_from_string("hep-lat"), expected, "returns both archive and category")
Expand Down

0 comments on commit f14e702

Please sign in to comment.