-
Notifications
You must be signed in to change notification settings - Fork 5
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
Kamil Kamiński
committed
Jan 18, 2024
1 parent
5c62f00
commit 24c136d
Showing
3 changed files
with
28 additions
and
2 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
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,19 @@ | ||
import pytest | ||
|
||
|
||
|
||
|
||
@pytest.mark.parametrize("size", [10, 50, 100]) | ||
def test_remove_duplicates(size): | ||
''' | ||
test if function properly filter redundant hits eg. a-b, a-b, a-c func should exclude b-a | ||
''' | ||
|
||
data = {idx: list(range(size)) for idx in range(size)} | ||
# func | ||
|
||
# expected number of samples is size*(size - 1)/2 | ||
expected_size = size*(size - 1)/2 | ||
actual_size = sum([len(v) for v in data.values()]) | ||
|
||
assert actual_size == expected_size |