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