예제 #1
0
 def test_int_symmetry(self):
     """encode/decode_int should work back and forth."""
     result = wire.encode_int(99)
     self.assertEqual(wire.decode_int(result), (99, ''))
예제 #2
0
파일: __init__.py 프로젝트: kylev/mysqlp
def _extract_int(data, length=1):
    """Extract an n-byte integer, return it and the remaining string."""
    return wire.decode_int(data, length)