Skip to content

Commit e5a6a26

Browse files
committed
tests/types1: Split out set type test to set_types.
set isn't the most basic type and can be disabled by a port.
1 parent 36ec5c8 commit e5a6a26

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

tests/basics/set_type.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# set type
2+
3+
# This doesn't really work as expected, because {None}
4+
# leads SyntaxError during parsing.
5+
try:
6+
set
7+
except NameError:
8+
import sys
9+
print("SKIP")
10+
sys.exit()
11+
12+
print(set)
13+
14+
print(type(set()) == set)
15+
16+
print(type({None}) == set)

tests/basics/types1.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,22 @@
11
# basic types
2+
# similar test for set type is done in set_type.py
23

34
print(bool)
45
print(int)
56
print(tuple)
67
print(list)
7-
print(set)
88
print(dict)
99

1010
print(type(bool()) == bool)
1111
print(type(int()) == int)
1212
print(type(tuple()) == tuple)
1313
print(type(list()) == list)
14-
print(type(set()) == set)
1514
print(type(dict()) == dict)
1615

1716
print(type(False) == bool)
1817
print(type(0) == int)
1918
print(type(()) == tuple)
2019
print(type([]) == list)
21-
print(type({None}) == set)
2220
print(type({}) == dict)
2321

2422
try:

0 commit comments

Comments
 (0)