Skip to content

Commit

Permalink
Fix typo in purge parameter in tests and use more explicit exception
Browse files Browse the repository at this point in the history
  • Loading branch information
timj committed Sep 13, 2022
1 parent 74b4f7a commit a782053
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_butler.py
Original file line number Diff line number Diff line change
Expand Up @@ -799,10 +799,10 @@ def testPruneCollections(self):
# Try to delete RUN collections, which should fail with complete
# rollback because they're still referenced by the CHAINED
# collection.
with self.assertRaises(Exception):
butler.pruneCollection(run1, pruge=True, unstore=True)
with self.assertRaises(Exception):
butler.pruneCollection(run2, pruge=True, unstore=True)
with self.assertRaises(sqlalchemy.exc.IntegrityError):
butler.pruneCollection(run1, purge=True, unstore=True)
with self.assertRaises(sqlalchemy.exc.IntegrityError):
butler.pruneCollection(run2, purge=True, unstore=True)
self.assertCountEqual(set(butler.registry.queryDatasets(..., collections=...)), [ref1, ref2, ref3])
existence = butler.datastore.mexists([ref1, ref2, ref3])
self.assertTrue(existence[ref1])
Expand Down

0 comments on commit a782053

Please sign in to comment.