ethereum / py_ecc

Python implementation of ECC pairing and bn_128 and bls12_381 curve operations
MIT License
191 stars 82 forks source link

Add test for BLS12_381 #32

Closed ChihChengLiang closed 5 years ago

ChihChengLiang commented 5 years ago

What was wrong?

The new BLS12_381 implementation needs to be covered by some tests.

How was it fixed?

Name                                                     Stmts   Miss  Cover   Missing
--------------------------------------------------------------------------------------
py_ecc/__init__.py                                           3      0   100%
py_ecc/bls12_381/__init__.py                                 4      0   100%
py_ecc/bls12_381/bls12_381_curve.py                         68      6    91%   51, 72, 76, 90, 110, 117
py_ecc/bls12_381/bls12_381_field_elements.py               176     13    93%   11, 29, 89, 110, 114, 118, 147-152, 192, 220, 241
py_ecc/bls12_381/bls12_381_pairing.py                       52      3    94%   44, 73, 102
py_ecc/optimized_bls12_381/__init__.py                       4      0   100%
py_ecc/optimized_bls12_381/optimized_curve.py               91      8    91%   53, 80, 88, 107, 123-124, 134, 141
py_ecc/optimized_bls12_381/optimized_field_elements.py     178     18    90%   12, 21, 36, 53, 56-57, 72-74, 77, 81, 93, 102, 136-141, 223
py_ecc/optimized_bls12_381/optimized_pairing.py             74     12    84%   37-39, 71, 100, 115-119, 134, 142, 147
py_ecc/secp256k1/__init__.py                                 2      0   100%
py_ecc/secp256k1/secp256k1.py                              118     13    89%   7, 36, 53, 65, 67, 73-75, 94, 98, 110, 143, 151
--------------------------------------------------------------------------------------
TOTAL                                                      770     73    91%

Cute Animal Picture

put a cute animal picture link inside the parentheses

ChihChengLiang commented 5 years ago

Sorry, realized I'm working on the wrong branch after talking to @hwwhww.