diff options
| author | J08nY | 2019-04-21 17:41:20 +0200 |
|---|---|---|
| committer | J08nY | 2019-04-21 17:41:20 +0200 |
| commit | 1c5002cca81eee594041852b3748d4661d2b1968 (patch) | |
| tree | 062570d7a525de47aa3754aa3c3eb79ec786e965 | |
| parent | c4b98adbb7c9898dc830b9c6f4b1f52890a17632 (diff) | |
| download | pyecsca-1c5002cca81eee594041852b3748d4661d2b1968.tar.gz pyecsca-1c5002cca81eee594041852b3748d4661d2b1968.tar.zst pyecsca-1c5002cca81eee594041852b3748d4661d2b1968.zip | |
| -rw-r--r-- | .travis.yml | 4 | ||||
| -rw-r--r-- | Makefile | 6 | ||||
| -rw-r--r-- | pyecsca/ec/curve.py | 6 | ||||
| -rw-r--r-- | setup.py | 2 | ||||
| -rw-r--r-- | test/ec/test_point.py | 1 |
5 files changed, 12 insertions, 7 deletions
diff --git a/.travis.yml b/.travis.yml index b623c5a..d62e2d1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,11 @@ python: install: - pip install ".[test, typecheck]" + - pip install codecov script: - make -i typecheck - make test + +after_success: + - codecov @@ -1,11 +1,11 @@ test: - nose2 -A !slow -v + nose2 -A !slow -C -v test-plots: - env PYECSCA_TEST_PLOTS=1 nose2 -A !slow -v + env PYECSCA_TEST_PLOTS=1 nose2 -A !slow -C -v test-all: - nose2 -v + nose2 -C -v typecheck: mypy -p pyecsca --ignore-missing-imports diff --git a/pyecsca/ec/curve.py b/pyecsca/ec/curve.py index 4b84d24..97ccb58 100644 --- a/pyecsca/ec/curve.py +++ b/pyecsca/ec/curve.py @@ -1,5 +1,5 @@ from public import public -from typing import Mapping, Union +from typing import MutableMapping, Union from .coordinates import CoordinateModel from .mod import Mod @@ -12,11 +12,11 @@ class EllipticCurve(object): model: CurveModel coordinate_model: CoordinateModel prime: int - parameters: Mapping[str, Mod] + parameters: MutableMapping[str, Mod] neutral: Point def __init__(self, model: CurveModel, coordinate_model: CoordinateModel, - prime: int, parameters: Mapping[str, Union[Mod, int]], neutral: Point): + prime: int, parameters: MutableMapping[str, Union[Mod, int]], neutral: Point): # TODO: Add base_point arg, order arg, cofactor arg. if coordinate_model not in model.coordinates.values(): raise ValueError @@ -31,6 +31,6 @@ setup( ], extras_require={ "typecheck": ["mypy"], - "test": ["nose2", "parameterized","green"] + "test": ["nose2", "parameterized","green", "coverage"] } ) diff --git a/test/ec/test_point.py b/test/ec/test_point.py index ea1e79a..a89a44f 100644 --- a/test/ec/test_point.py +++ b/test/ec/test_point.py @@ -57,3 +57,4 @@ class PointTests(TestCase): Y=Mod(0x3, self.secp128r1.prime), Z=Mod(1, self.secp128r1.prime)) assert pt.equals(other) + self.assertNotEquals(pt, other) |
