예제 #1
0
 def test_encode_ACCEPT_INT(self):
     assert GenericTypeCase.encode(self.i) == self.i
예제 #2
0
 def test_encode_ACCEPT_UNICODE(self):
     assert GenericTypeCase.encode(self.u) == self.u
예제 #3
0
 def test_encode_ACCEPT_UNICODE(self):
     assert GenericTypeCase.encode(self.u) == self.u
예제 #4
0
 def test_decode_RETURN_INT(self):
     assert GenericTypeCase.decode(str(self.i)) == self.i
예제 #5
0
 def test_decode_RETURN_FLOAT(self):
     assert GenericTypeCase.decode(str(self.f)) == self.f
예제 #6
0
 def test_encode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         GenericTypeCase.encode(self.wrong_type_input)
예제 #7
0
 def test_decode_RETURN_STRING(self):
     assert GenericTypeCase.decode(str(self.s)) == self.s
예제 #8
0
 def test_decode_RETURN_STRING(self):
     assert GenericTypeCase.decode(str(self.s)) == self.s
예제 #9
0
 def test_decode_RETURN_UNICODE(self):
     assert GenericTypeCase.decode(unicode(self.u)) == self.u
예제 #10
0
 def test_encode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(TypeError):
         GenericTypeCase.encode(self.wrong_type_input)
예제 #11
0
 def test_decode_RETURN_NONE(self):
     assert GenericTypeCase.decode(None) is None
예제 #12
0
 def test_encode_ACCEPT_FLOAT(self):
     assert GenericTypeCase.encode(self.f) == self.f
예제 #13
0
 def test_encode_ACCEPT_LONG(self):
     assert GenericTypeCase.encode(self.l) == self.l
예제 #14
0
 def test_encode_ACCEPT_INT(self):
     assert GenericTypeCase.encode(self.i) == self.i
예제 #15
0
 def test_encode_ACCEPT_LONG(self):
     assert GenericTypeCase.encode(self.l) == self.l
예제 #16
0
 def test_decode_RETURN_INT(self):
     assert GenericTypeCase.decode(str(self.i)) == self.i
예제 #17
0
 def test_encode_ACCEPT_FLOAT(self):
     assert GenericTypeCase.encode(self.f) == self.f
예제 #18
0
 def test_decode_RETURN_LONG(self):
     assert GenericTypeCase.decode(str(self.l)) == self.l
예제 #19
0
 def test_decode_RETURN_NONE(self):
     assert GenericTypeCase.decode(None) is None
예제 #20
0
 def test_decode_RETURN_FLOAT(self):
     assert GenericTypeCase.decode(str(self.f)) == self.f
예제 #21
0
 def test_decode_RETURN_UNICODE(self):
     assert GenericTypeCase.decode(unicode(self.u)) == self.u
예제 #22
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(AssertionError):
         GenericTypeCase.decode(self.l)
예제 #23
0
 def test_decode_RETURN_LONG(self):
     assert GenericTypeCase.decode(str(self.l)) == self.l
예제 #24
0
 def test_encode_ACCEPT_STRING(self):
     assert GenericTypeCase.encode(self.s) == self.s
예제 #25
0
 def test_decode_RAISE_when_INPUT_WRONG_TYPE(self):
     with self.assertRaises(AssertionError):
         GenericTypeCase.decode(self.l)
예제 #26
0
 def test_encode_ACCEPT_STRING(self):
     assert GenericTypeCase.encode(self.s) == self.s