def test_roundtrip(self): for i in range(1000): Verhoeff.strip(Verhoeff.protect(randint(0, 2 ** 32 - 1)))
def check(n, z): print (n, z, Verhoeff.protect(n)) assert Verhoeff.protect(n) == z