Beispiel #1
0
 def test_cast_off(self):
     val = global_status._cast('OFF')
     assert not val and isinstance(val, bool)
Beispiel #2
0
 def test_cast_string(self):
     val = global_status._cast('something')
     assert val == 'something'
Beispiel #3
0
 def test_cast_float(self):
     val = global_status._cast('1.0')
     assert val == 1.0 and isinstance(val, float)
Beispiel #4
0
 def test_cast_on(self):
     val = global_status._cast('ON')
     assert val and isinstance(val, bool)
 def test_cast_string(self):
     val = global_status._cast('something')
     assert val == 'something'
Beispiel #6
0
 def test_cast_int(self):
     val = global_status._cast('1')
     assert val == 1 and isinstance(val, int)
 def test_cast_off(self):
     val = global_status._cast('OFF')
     assert not val and isinstance(val, bool)
 def test_cast_on(self):
     val = global_status._cast('ON')
     assert val and isinstance(val, bool)
 def test_cast_float(self):
     val = global_status._cast('1.0')
     assert val == 1.0 and isinstance(val, float)
 def test_cast_int(self):
     val = global_status._cast('1')
     assert val == 1 and isinstance(val, int)
Beispiel #11
0
 def test_cast_string(self):
     val = global_status._cast("something")
     assert val == "something"