Exemplo n.º 1
0
 def test_decode(self):
     for (length, encoded_bytes) in self.test_cases:
         self.assertEqual(ObjectLength.decode(encoded_bytes)[0], length)
Exemplo n.º 2
0
 def test_encode(self):
     for (length, encoded_bytes) in self.test_cases:
         self.assertEqual(ObjectLength.encode(length), encoded_bytes)