Esempio n. 1
0
 def test_boolean(self):
     v = Value(True)
     assert (v.dtype == "boolean")
     assert (type(v.data) == bool)
     v = Value(False)
     assert (v.dtype == "boolean")
     assert (type(v.data) == bool)
Esempio n. 2
0
 def test_string(self):
     v = Value("somestring")
     assert (v.dtype == "string")
     assert (type(v.data) == str)
Esempio n. 3
0
 def test_time(self):
     v = Value(dt.now().time())
     assert (v.dtype == "time")
     assert (type(v.data) == time)
Esempio n. 4
0
 def test_date(self):
     v = Value(dt.now().date())
     assert (v.dtype == "date")
     assert (type(v.data) == date)
Esempio n. 5
0
 def test_float(self):
     v = Value(3.14)
     assert (v.dtype == "float")
     assert (type(v.data) == float)
Esempio n. 6
0
 def test_int(self):
     v = Value(111)
     assert (v.dtype == "int")
     assert (type(v.data) == int)
Esempio n. 7
0
 def test_text(self):
     v = Value("some\nstring")
     assert (v.dtype == "text")
     assert (type(v.data) == str)