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:
Paul Sokolovsky 2017-01-06 11:01:55 +03:00
parent 36ec5c8f27
commit e5a6a26330
2 changed files with 17 additions and 3 deletions

16
tests/basics/set_type.py Normal file
View 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)

View File

@ -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: