tests: Add test on set/frozenset equality.

This commit is contained in:
Paul Sokolovsky 2015-08-28 22:41:50 +03:00
parent 8b3b2d04a8
commit a160b70ced
1 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,13 @@
try:
frozenset
except NameError:
print("SKIP")
import sys
sys.exit()
# Examples from https://docs.python.org/3/library/stdtypes.html#set
# "Instances of set are compared to instances of frozenset based on their
# members. For example:"
print(set('abc') == frozenset('abc'))
# This doesn't work in uPy
#print(set('abc') in set([frozenset('abc')]))