Exemplo n.º 1
0
 def test_encode_v2_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     encoded = _encode_v2(text)
     decoded = _decode_v2(encoded)
     self.assertEqual(text, decoded)
Exemplo n.º 2
0
 def test_encode_v2_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     encoded = _encode_v2(text)
     decoded = _decode_v2(encoded)
     self.assertEqual(text, decoded)
Exemplo n.º 3
0
 def test_decode_v2_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     try:
         decoded = _decode_v2(text)
     except ValueError:
         pass
     else:
         encoded = _encode_v2(decoded)
         self.assertEqual(text, encoded)
Exemplo n.º 4
0
 def test_decode_v2_roundtrip(self, text):
     """
     Test all combinations that include characters we're trying to encode, or using in the encoding.
     """
     try:
         decoded = _decode_v2(text)
     except ValueError:
         pass
     else:
         encoded = _encode_v2(decoded)
         self.assertEqual(text, encoded)
Exemplo n.º 5
0
 def test_valid_v2_decoding(self, string, result):
     self.assertEqual(_decode_v2(string), result)
Exemplo n.º 6
0
 def test_valid_v2_decoding(self, string, result):
     self.assertEqual(_decode_v2(string), result)