summaryrefslogtreecommitdiff
path: root/test.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2024-04-12 15:13:28 -0400
committerRob Austein <sra@hactrn.net>2024-04-12 15:13:28 -0400
commit6bf095983bb1d377f573633c83fd380c76297ed9 (patch)
tree746e8cc1da37631edd08ada3432bbfa85c551917 /test.py
parentf2976c2d08db3f940735d3b7727a18c10ef8b5c1 (diff)
Refactor and add text for humans
Diffstat (limited to 'test.py')
-rwxr-xr-xtest.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/test.py b/test.py
index cd48e1c..23d28d8 100755
--- a/test.py
+++ b/test.py
@@ -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))