sets do not have stable ordering, so stop trying to print them in tests

This commit is contained in:
K. Lange 2021-02-08 09:36:30 +09:00
parent e4df06c85f
commit f5d9a6b806
2 changed files with 20 additions and 4 deletions

View File

@ -1,2 +1,12 @@
print({1,2,3,object,True,None,"test"})
print({str(i) for i in [1,2,3,object,print]})
let s1 = {1,2,3,object,True,None,"test"}
print(1 in s1)
print(2 in s1)
print(3 in s1)
print(object in s1)
print(True in s1)
print(None in s1)
print("test" in s1)
let l2 = [x for x in {str(i) for i in [1,2,3,object,True,None,"test"]}]
l2.sort()
print(l2)

View File

@ -1,2 +1,8 @@
{None, 1, 'test', <type 'object'>, 3, 2}
{'1', '2', "<type 'object'>", '3', '<function print>'}
True
True
True
True
True
True
True
['1', '2', '3', "<type 'object'>", 'None', 'True', 'test']