Ejemplo n.º 1
0
 def test_type_int(self):
     assert syntax.datatype(1) == int
Ejemplo n.º 2
0
 def test_type_float(self):
     assert syntax.datatype(1.0) == float
Ejemplo n.º 3
0
 def test_type_dictionary(self):
     assert syntax.datatype({"a": 1, "b": 2}) == dict
Ejemplo n.º 4
0
 def test_type_none(self):
     assert syntax.datatype(None) == type(None)
Ejemplo n.º 5
0
 def test_type_list(self):
     assert syntax.datatype(["a", 1]) == list
Ejemplo n.º 6
0
 def test_type_set(self):
     assert syntax.datatype({"a", "b"}) == set
Ejemplo n.º 7
0
 def test_type_tuple(self):
     assert syntax.datatype(("a", 1)) == tuple
Ejemplo n.º 8
0
 def test_type_bool(self):
     assert syntax.datatype(True) == bool
Ejemplo n.º 9
0
 def test_type_string_multi(self):
     assert syntax.datatype("string") == str
Ejemplo n.º 10
0
 def test_type_string(self):
     assert (syntax.datatype("""multi
             line
             string""") == str)
Ejemplo n.º 11
0
 def test_type_complex(self):
     assert syntax.datatype(1j) == complex