Example #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)
Example #2
0
 def test_string(self):
     v = Value("somestring")
     assert (v.dtype == "string")
     assert (type(v.data) == str)
Example #3
0
 def test_time(self):
     v = Value(dt.now().time())
     assert (v.dtype == "time")
     assert (type(v.data) == time)
Example #4
0
 def test_date(self):
     v = Value(dt.now().date())
     assert (v.dtype == "date")
     assert (type(v.data) == date)
Example #5
0
 def test_float(self):
     v = Value(3.14)
     assert (v.dtype == "float")
     assert (type(v.data) == float)
Example #6
0
 def test_int(self):
     v = Value(111)
     assert (v.dtype == "int")
     assert (type(v.data) == int)
Example #7
0
 def test_text(self):
     v = Value("some\nstring")
     assert (v.dtype == "text")
     assert (type(v.data) == str)