mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-17 01:51:39 +09:00
Add a few tests for sets which reflect new changes.
This commit is contained in:
16
tests/snippets/test_sets.py
Normal file
16
tests/snippets/test_sets.py
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
empty_set = set()
|
||||
non_empty_set = set([1,2,3])
|
||||
|
||||
assert 1 in non_empty_set
|
||||
assert 4 not in non_empty_set
|
||||
|
||||
# TODO: Assert that empty aruguments raises exception.
|
||||
non_empty_set.add('a')
|
||||
assert 'a' in non_empty_set
|
||||
|
||||
# TODO: Assert that empty arguments, or item not in set raises exception.
|
||||
non_empty_set.remove(1)
|
||||
assert 1 not in non_empty_set
|
||||
|
||||
# TODO: Assert that adding the same thing to a set once it's already there doesn't do anything.
|
||||
Reference in New Issue
Block a user