diff options
author | Rob Austein <sra@hactrn.net> | 2024-04-12 15:13:28 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2024-04-12 15:13:28 -0400 |
commit | 6bf095983bb1d377f573633c83fd380c76297ed9 (patch) | |
tree | 746e8cc1da37631edd08ada3432bbfa85c551917 /test.py | |
parent | f2976c2d08db3f940735d3b7727a18c10ef8b5c1 (diff) |
Refactor and add text for humans
Diffstat (limited to 'test.py')
-rwxr-xr-x | test.py | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1,6 +1,6 @@ #!/usr/bin/env python3 -from rfc1982_serial_number import Serial, step, show +from rfc1982_serial_number import Serial, find_intermediate from random import randint for test in range(10000): @@ -12,4 +12,9 @@ for test in range(10000): (i1 > i2 and not (i1 < i2)) or \ int(i1) & int(i2) == Serial.modulus >> 1 - show(step(i1, i2)) + step = [i1, i2] + wrap = find_intermediate(i1, i2) + if wrap is not None: + step.insert(1, wrap) + + print(" => ".join(str(s) for s in step)) |