-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unit test for Mersenne primes #60
Conversation
Unit testing now takes much, much longer; it increased from ± 2 seconds to ± 24 seconds on my machine, for a single Tox environment. Please reduce the size of the numbers, and the number of numbers, to the minimum that's needed to perform the tests. |
Could you please test execution time again? I just removed testing for product of primes, and Travis times have returned to normal. |
On my little Linux server (which I use for development when my desktop is booted to Windows and I don't want to reboot) this patch still increases unittest time on a single Tox environment (py34) from 13 to 21 seconds. Are all these test cases really necessary? |
I chose these test cases for testing primes up to the 4096-bit range! Reducing it to 2048-bit range saves 4 cases. Actually, we could remove last test case and still remain in 4096-bit range (because of Testing times on my hardware (
IMHO, correct prime generation and validation is essential in RSA, so I think it worths the testing overhead, especially having Travis to handle unittest. |
Changes Unknown when pulling 20c1693 on adamantike:test-mersenne-primes into * on sybrenstuvel:master*. |
Changes Unknown when pulling 0b8c914 on adamantike:test-mersenne-primes into * on sybrenstuvel:master*. |
Yes, let's go for "Proposed PR 4096-bit", as I fully agree we should test 4096 bits! |
Merged in a72efaa |
Checks Mersenne primes' primality. Tests bigger numbers, so it also checks Miller-Rabin's correct result for bigger bitsizes (and less rounds after merging #58).
It could help with #54, by giving more testcases and reducing the random factor affecting test coverage.9a9e08c fixed this.