예제 #1
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         FloatTypeCase.decode(self.wrong_type_input)
예제 #2
0
 def test_decode_RETURN_FLOAT(self):
     assert FloatTypeCase.decode(str(self.f)) == self.f
예제 #3
0
 def test_encode_ACCEPT_INT(self):
     assert FloatTypeCase.encode(self.i) == float(self.i)
예제 #4
0
 def test_decode_RETURN_NONE(self):
     assert FloatTypeCase.decode(None) == None
예제 #5
0
 def test_encode_ACCEPT_FLOAT(self):
     assert FloatTypeCase.encode(self.f) == self.f