improve test for set

This commit is contained in:
Prodesire 2017-12-24 23:45:04 +08:00
parent a2aa10a6d4
commit 1fff461708
1 changed files with 7 additions and 1 deletions

View File

@ -7,6 +7,12 @@ def test_ordered_set():
assert 1 in ordered_set assert 1 in ordered_set
assert bool(ordered_set) assert bool(ordered_set)
ordered_set.add(1)
assert 1 in ordered_set
ordered_set.remove(1)
assert 1 not in ordered_set
for i in range(4): for i in range(4):
ordered_set.discard(i) ordered_set.discard(i)
assert not bool(ordered_set) assert not bool(ordered_set)