-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
...accession-release-automation/gather_clustering_counts/tests/test_gather_release_counts.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from gather_clustering_counts.gather_release_counts import find_link | ||
|
||
|
||
def test_find_links(): | ||
d1 = { | ||
'A': ['1', '2'], | ||
'B': ['2', '5'], | ||
'C': ['3', '4'], | ||
'D': ['5'] | ||
} | ||
d2 = { | ||
'1': ['A', 'B'], | ||
'2': ['A'], | ||
'3': ['C'], | ||
'4': ['C'], | ||
'5': ['D', 'B'] | ||
} | ||
assert find_link({'A'}, d1, d2) == (frozenset({'A', 'B', 'D'}), frozenset({'1', '2', '5'})) | ||
assert find_link({'B'}, d1, d2) == (frozenset({'A', 'B', 'D'}), frozenset({'1', '2', '5'})) | ||
assert find_link({'C'}, d1, d2) == (frozenset({'C'}), frozenset({'3', '4'})) | ||
assert find_link({'D'}, d1, d2) == (frozenset({'A', 'B', 'D'}), frozenset({'1', '2', '5'})) |