summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2024-04-12 15:21:31 -0400
committerRob Austein <sra@hactrn.net>2024-04-12 15:21:31 -0400
commit7ef69b89b6f6c11919e5fe7927f96a1fa83d12d7 (patch)
treeb105979a1af308cea8aee2d792b1b903053f0d3e
parent6bf095983bb1d377f573633c83fd380c76297ed9 (diff)
More tests
-rw-r--r--.gitignore1
-rwxr-xr-xtest1.py (renamed from test.py)0
-rwxr-xr-xtest2.py12
3 files changed, 13 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..bee8a64
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1 @@
+__pycache__
diff --git a/test.py b/test1.py
index 23d28d8..23d28d8 100755
--- a/test.py
+++ b/test1.py
diff --git a/test2.py b/test2.py
new file mode 100755
index 0000000..69c8ae1
--- /dev/null
+++ b/test2.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+from rfc1982_serial_number import Serial
+from random import randint
+from subprocess import run
+
+for test in range(10000):
+ i1 = randint(0, Serial.modulus - 1)
+ i2 = randint(0, Serial.modulus - 1)
+ cmd = "./rfc1982_serial_number.py", str(i1), str(i2)
+ print(f"\nTest: {test}: {cmd[0]} {cmd[1]} {cmd[2]}")
+ run(cmd)