Skip to content

Commit 7208cad

Browse files
committed
tests/basics: Add more set tests to improve coverage of py/objset.c.
1 parent 136cb7f commit 7208cad

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

tests/basics/set_binop.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@
6060
print('TypeError')
6161

6262
# unsupported operator
63+
try:
64+
set('abc') * set('abc')
65+
except TypeError:
66+
print('TypeError')
67+
68+
# unsupported operator with RHS not a set
6369
try:
6470
set('abc') * 2
6571
except TypeError:

tests/basics/set_isfooset.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
sets = [set(), {1}, {1, 2, 3}, {3, 4, 5}, {5, 6, 7}]
2+
args = sets + [[1], [1, 2], [1, 2 ,3]]
23
for i in sets:
3-
for j in sets:
4+
for j in args:
45
print(i.issubset(j))
56
print(i.issuperset(j))

0 commit comments

Comments
 (0)