예제 #1
0
 def test_encode_v1_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     encoded = _encode_v1(text)
     decoded = _decode_v1(encoded)
     self.assertEqual(text, decoded)
예제 #2
0
 def test_encode_v1_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     encoded = _encode_v1(text)
     decoded = _decode_v1(encoded)
     self.assertEqual(text, decoded)
예제 #3
0
 def test_decode_v1_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     try:
         decoded = _decode_v1(text)
     except ValueError:
         pass
     else:
         encoded = _encode_v1(decoded)
         self.assertEqual(text, encoded)
예제 #4
0
 def test_decode_v1_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     try:
         decoded = _decode_v1(text)
     except ValueError:
         pass
     else:
         encoded = _encode_v1(decoded)
         self.assertEqual(text, encoded)
예제 #5
0
 def test_valid_v1_decoding(self, string, result):
     self.assertEqual(_decode_v1(string), result)
예제 #6
0
 def test_valid_v1_decoding(self, string, result):
     self.assertEqual(_decode_v1(string), result)