Ejemplo n.º 1
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         IntTypeCase.decode(self.wrong_type_input)
Ejemplo n.º 2
0
 def test_decode_RETURN_INT(self):    
     assert IntTypeCase.decode(str(self.i)) == self.i
Ejemplo n.º 3
0
 def test_decode_RETURN_LONG(self):
     assert IntTypeCase.decode(str(self.l)) == self.l
Ejemplo n.º 4
0
 def test_encode_ACCEPT_LONG(self):
     assert IntTypeCase.encode(self.l) == self.l
Ejemplo n.º 5
0
 def test_decode_RETURN_NONE(self):
     assert IntTypeCase.decode(None) == None
Ejemplo n.º 6
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         IntTypeCase.decode(self.wrong_type_input)
Ejemplo n.º 7
0
 def test_encode_ACCEPT_INT(self):
     assert IntTypeCase.encode(self.i) == self.i
Ejemplo n.º 8
0
 def test_decode_RETURN_LONG(self):
     assert IntTypeCase.decode(str(self.l)) == self.l
Ejemplo n.º 9
0
 def test_decode_RETURN_INT(self):
     assert IntTypeCase.decode(str(self.i)) == self.i
Ejemplo n.º 10
0
 def test_decode_RETURN_NONE(self):
     assert IntTypeCase.decode(None) == None
Ejemplo n.º 11
0
 def test_encode_ACCEPT_LONG(self):
     assert IntTypeCase.encode(self.l) == self.l
Ejemplo n.º 12
0
 def test_encode_ACCEPT_INT(self):
     assert IntTypeCase.encode(self.i) == self.i