Files
chia-blockchain/chia/_tests/util/test_collection.py
Kyle AltendorfandGitHub a89222a428 move tests (#17209)
* prep

* verify source and installed tests match

* move

* remove move script
2024-03-14 10:19:20 -07:00

12 lines
353 B
Python

from __future__ import annotations
from chia.util.collection import find_duplicates
def test_find_duplicates() -> None:
assert find_duplicates([]) == set()
assert find_duplicates([1, 1]) == {1}
assert find_duplicates([3, 2, 1]) == set()
assert find_duplicates([1, 2, 3]) == set()
assert find_duplicates([1, 2, 3, 2, 1]) == {1, 2}