From 46b72a462dbd7955f7e8f13cef1b1a3cb0af2c51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 29 Mar 2016 18:15:25 +0200 Subject: Added unittest for rsa.common.inverse This unittest tests both execution branches of the function, reducing randomness of code coverage. --- rsa/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'rsa/common.py') diff --git a/rsa/common.py b/rsa/common.py index e074334..b573252 100644 --- a/rsa/common.py +++ b/rsa/common.py @@ -131,7 +131,7 @@ def extended_gcd(a, b): def inverse(x, n): - """Returns x^-1 (mod n) + """Returns the inverse of x % n under multiplication, a.k.a x^-1 (mod n) >>> inverse(7, 4) 3 -- cgit v1.2.1