aboutsummaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/ec/test_context.py2
-rw-r--r--test/ec/test_curve.py7
2 files changed, 7 insertions, 2 deletions
diff --git a/test/ec/test_context.py b/test/ec/test_context.py
index c3112d4..603369d 100644
--- a/test/ec/test_context.py
+++ b/test/ec/test_context.py
@@ -86,8 +86,6 @@ class ContextTests(TestCase):
with local(PathContext([0, 1, 7])) as ctx:
key_generator = KeyGeneration(self.mult, self.secp128r1, True)
key_generator.generate()
- print(ctx.value)
-
def test_str(self):
with local(DefaultContext()) as default:
diff --git a/test/ec/test_curve.py b/test/ec/test_curve.py
index f9e3387..a480bb0 100644
--- a/test/ec/test_curve.py
+++ b/test/ec/test_curve.py
@@ -70,6 +70,13 @@ class CurveTests(TestCase):
self.assertIsNone(self.curve25519.curve.affine_neutral)
self.assertIsNotNone(self.ed25519.curve.affine_neutral)
+ def test_affine_random(self):
+ for params in [self.secp128r1, self.curve25519, self.ed25519]:
+ for _ in range(20):
+ pt = params.curve.affine_random()
+ self.assertIsNotNone(pt)
+ self.assertTrue(params.curve.is_on_curve(pt))
+
def test_neutral_is_affine(self):
self.assertFalse(self.secp128r1.curve.neutral_is_affine)
self.assertFalse(self.curve25519.curve.neutral_is_affine)