mirror of https://github.com/flaggo/pydu.git
13 lines
295 B
Python
13 lines
295 B
Python
|
from pydu.structures import OrderedSet
|
||
|
|
||
|
|
||
|
def test_ordered_set():
|
||
|
ordered_set = OrderedSet([1, 3, 1, 2])
|
||
|
assert list(ordered_set) == [1, 3, 2]
|
||
|
assert 1 in ordered_set
|
||
|
assert bool(ordered_set)
|
||
|
|
||
|
for i in range(4):
|
||
|
ordered_set.discard(i)
|
||
|
assert not bool(ordered_set)
|