tests/basics: Add more set tests to improve coverage of py/objset.c.
This commit is contained in:
parent
136cb7f27c
commit
7208cad97a
@ -60,6 +60,12 @@ except TypeError:
|
||||
print('TypeError')
|
||||
|
||||
# unsupported operator
|
||||
try:
|
||||
set('abc') * set('abc')
|
||||
except TypeError:
|
||||
print('TypeError')
|
||||
|
||||
# unsupported operator with RHS not a set
|
||||
try:
|
||||
set('abc') * 2
|
||||
except TypeError:
|
||||
|
@ -1,5 +1,6 @@
|
||||
sets = [set(), {1}, {1, 2, 3}, {3, 4, 5}, {5, 6, 7}]
|
||||
args = sets + [[1], [1, 2], [1, 2 ,3]]
|
||||
for i in sets:
|
||||
for j in sets:
|
||||
for j in args:
|
||||
print(i.issubset(j))
|
||||
print(i.issuperset(j))
|
||||
|
Loading…
Reference in New Issue
Block a user