Ejemplo n.º 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
Ejemplo n.º 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
Ejemplo n.º 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