tests/types1: Split out set type test to set_types.
set isn't the most basic type and can be disabled by a port.
This commit is contained in:
parent
36ec5c8f27
commit
e5a6a26330
16
tests/basics/set_type.py
Normal file
16
tests/basics/set_type.py
Normal file
@ -0,0 +1,16 @@
|
||||
# set type
|
||||
|
||||
# This doesn't really work as expected, because {None}
|
||||
# leads SyntaxError during parsing.
|
||||
try:
|
||||
set
|
||||
except NameError:
|
||||
import sys
|
||||
print("SKIP")
|
||||
sys.exit()
|
||||
|
||||
print(set)
|
||||
|
||||
print(type(set()) == set)
|
||||
|
||||
print(type({None}) == set)
|
@ -1,24 +1,22 @@
|
||||
# basic types
|
||||
# similar test for set type is done in set_type.py
|
||||
|
||||
print(bool)
|
||||
print(int)
|
||||
print(tuple)
|
||||
print(list)
|
||||
print(set)
|
||||
print(dict)
|
||||
|
||||
print(type(bool()) == bool)
|
||||
print(type(int()) == int)
|
||||
print(type(tuple()) == tuple)
|
||||
print(type(list()) == list)
|
||||
print(type(set()) == set)
|
||||
print(type(dict()) == dict)
|
||||
|
||||
print(type(False) == bool)
|
||||
print(type(0) == int)
|
||||
print(type(()) == tuple)
|
||||
print(type([]) == list)
|
||||
print(type({None}) == set)
|
||||
print(type({}) == dict)
|
||||
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user