mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 20:20:14 +01:00
objset: Add frozenset tests, skippable if frozenset not available.
This commit is contained in:
12
tests/basics/frozenset_copy.py
Normal file
12
tests/basics/frozenset_copy.py
Normal file
@@ -0,0 +1,12 @@
|
||||
try:
|
||||
frozenset
|
||||
except NameError:
|
||||
print("SKIP")
|
||||
import sys
|
||||
sys.exit()
|
||||
|
||||
s = frozenset({1, 2, 3, 4})
|
||||
t = s.copy()
|
||||
print(type(t))
|
||||
for i in s, t:
|
||||
print(sorted(i))
|
||||
Reference in New Issue
Block a user