Skip to content

Commit

Permalink
Simplify document counting in unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nadove-ucsc authored and hannes-ucsc committed Sep 20, 2023
1 parent 514a2c9 commit b3dfea2
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions test/indexer/test_indexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,11 +407,7 @@ def _walkthrough(v):
return old_file_uuid

def _num_docs_by_index(self, hits) -> Mapping[tuple[str, bool], int]:
counter = Counter()
for hit in hits:
entity_type, aggregate = self._parse_index_name(hit)
counter[entity_type, aggregate] += 1
return counter
return Counter(map(self._parse_index_name, hits))

def test_indexed_matrices(self):
"""
Expand Down

0 comments on commit b3dfea2

Please sign in to comment.