Skip to content

Commit

Permalink
Add unit test for BagError exception propagation in validate().
Browse files Browse the repository at this point in the history
  • Loading branch information
mikedarcy committed Sep 28, 2021
1 parent c6731c9 commit 08a823b
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions test/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,13 @@ def test_validate_incomplete_bag_fast(self):
except Exception as e:
self.fail(get_typed_exception(e))

def test_validate_non_bag(self):
logger.info(self.getTestHeader('test validation non-bag'))
try:
self.assertRaises(bdbagit.BagError, bdb.validate_bag, self.test_data_dir)
except Exception as e:
self.fail(get_typed_exception(e))

def test_validate_incomplete_bag_structure(self):
logger.info(self.getTestHeader('test structure validation incomplete bag'))
try:
Expand Down

0 comments on commit 08a823b

Please sign in to comment.