示例#1
0
 def test_types(self):
   assert type(u'') == String
   assert type('') == String
   assert not type('') == Object
   assert not type([]) == Object
   assert type([]) == Array
   assert type('') == Any
   assert Any.kind('') == String
   assert Any.decode('str') == String
   assert Any.kind({}) == Object
   assert Any.kind(None) == Nil
示例#2
0
 def test_types(self):
   if six.PY2:
     assert type(unicode('')) == String
   assert type('') == String
   assert not type('') == Object
   assert not type([]) == Object
   assert type([]) == Array
   assert type('') == Any
   assert Any.kind('') == String
   assert Any.decode('str') == String
   assert Any.kind({}) == Object
   assert Any.kind(None) == Nil
   assert type(1) == Number
   assert type(1.1) == Number
示例#3
0
 def test_types(self):
     if six.PY2:
         assert type(unicode('')) == String
     assert type('') == String
     assert not type('') == Object
     assert not type([]) == Object
     assert type([]) == Array
     assert type('') == Any
     assert Any.kind('') == String
     assert Any.decode('str') == String
     assert Any.kind({}) == Object
     assert Any.kind(None) == Nil
     assert type(1) == Number
     assert type(1.1) == Number