-
Notifications
You must be signed in to change notification settings - Fork 64
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
Add tests and refactor polynomial.py #51
Conversation
smkuls
commented
Sep 7, 2018
- Refactoring and cleaning up polynomial.py
- Adding tests to verify the functionality of the methods
2b42fba
to
88bc54d
Compare
Codecov Report
@@ Coverage Diff @@
## dev #51 +/- ##
===================================================
+ Coverage 74.08231% 76.38889% +2.30657%
===================================================
Files 11 11
Lines 899 864 -35
Branches 150 142 -8
===================================================
- Hits 666 660 -6
+ Misses 206 183 -23
+ Partials 27 21 -6 |
tests/test_polynomial.py
Outdated
from random import randint | ||
|
||
Field = GF(0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001) | ||
Poly = polynomial.polynomialsOver(Field) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can make use of the following fixtures: https://github.com/initc3/HoneyBadgerMPC/blob/dev/tests/conftest.py#L27-L38
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p.s.: If using the fixtures, you'll need to invoke them for each test function: e.g.:
def test_poly_eval_at_k(GaloisField, Polynomial):
poly1 = Polynomial([0, 1]) # y = x
# ...
coeffs = [randint(0, GaloisField.modulus-1) for i in range(d)]
# ...
88bc54d
to
faa2508
Compare
faa2508
to
43d76f7
Compare