def test_base85_is_idempotent(self): # we use this for 12-bit hashes for i in [0, 63, 100, 1000, 4095, 4294967295]: assert i == to_base10(to_base85(i), 85)
def test_base64_is_idempotent(self): for i in [0, 63, 782963129, 99999999, 2147483647]: assert i == to_base10(to_base_n(i, 64), 64)
def test_base36_is_idempotent(self): for i in [0, 63, 782963129, 99999999, 2147483647]: assert i == to_base10(to_base_n(i, 36), 36)