Example #1
0
 def test_cast_off(self):
     val = global_status._cast('OFF')
     assert not val and isinstance(val, bool)
Example #2
0
 def test_cast_string(self):
     val = global_status._cast('something')
     assert val == 'something'
Example #3
0
 def test_cast_float(self):
     val = global_status._cast('1.0')
     assert val == 1.0 and isinstance(val, float)
Example #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'
Example #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)
Example #11
0
 def test_cast_string(self):
     val = global_status._cast("something")
     assert val == "something"