Skip to content

Commit

Permalink
fix: [tests] don't die if duplicates, but report them in the right test
Browse files Browse the repository at this point in the history
cvandeplas committed Jun 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 47ed9cb commit acfb1e4
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions tests/tests.py
Original file line number Diff line number Diff line change
@@ -15,7 +15,7 @@ class TestPyMISPGalaxies(unittest.TestCase):

def setUp(self):
self.galaxies = Galaxies()
self.clusters = Clusters(skip_duplicates=False)
self.clusters = Clusters(skip_duplicates=True)
self.maxDiff = None

def test_searchable(self):
@@ -36,7 +36,7 @@ def test_duplicates(self):
to_print = Counter(c.duplicates)
for entry, counter in to_print.items():
print(counter + 1, entry)
self.assertFalse(has_duplicates)
self.assertFalse(has_duplicates, msg="Duplicates found")

def test_dump_galaxies(self):
galaxies_from_files = {}
2 changes: 1 addition & 1 deletion tests/tests_api.py
Original file line number Diff line number Diff line change
@@ -9,7 +9,7 @@ class TestPyMISPGalaxiesApi(unittest.TestCase):

def setUp(self):
self.galaxies = Galaxies()
self.clusters = Clusters(skip_duplicates=False)
self.clusters = Clusters(skip_duplicates=True)
self.maxDiff = None

def test_get_by_external_id(self):

0 comments on commit acfb1e4

Please sign in to comment.