From 483eebd0dd4aefb60552e701dfa13d747881dd63 Mon Sep 17 00:00:00 2001 From: J08nY Date: Tue, 16 Apr 2024 15:38:09 +0200 Subject: Fix DeepSourcce issues. --- test/sca/test_plot.py | 1 + test/sca/test_rpa.py | 12 +++++++++--- test/sca/test_target.py | 6 +++--- 3 files changed, 13 insertions(+), 6 deletions(-) (limited to 'test/sca') diff --git a/test/sca/test_plot.py b/test/sca/test_plot.py index 2722ba3..78e1098 100644 --- a/test/sca/test_plot.py +++ b/test/sca/test_plot.py @@ -39,6 +39,7 @@ def test_png(trace1, plot_path): save_figure_png(fig, str(plot_path())) +@pytest.mark.skip("Broken without some backend.") def test_svg(trace1, plot_path): hv.extension("matplotlib") fig = plot_trace(trace1) diff --git a/test/sca/test_rpa.py b/test/sca/test_rpa.py index af19ba2..0e22efa 100644 --- a/test/sca/test_rpa.py +++ b/test/sca/test_rpa.py @@ -1,6 +1,3 @@ -import io -from contextlib import redirect_stdout - import pytest from pyecsca.ec.context import local @@ -107,6 +104,15 @@ def test_distinguish(secp128r1, add, dbl, neg): WindowNAFMultiplier( add, dbl, neg, 5, None, AccumulationOrder.PeqPR, True, True ), + WindowBoothMultiplier( + add, dbl, neg, 3, None, AccumulationOrder.PeqPR, True, True + ), + WindowBoothMultiplier( + add, dbl, neg, 4, None, AccumulationOrder.PeqPR, True, True + ), + WindowBoothMultiplier( + add, dbl, neg, 5, None, AccumulationOrder.PeqPR, True, True + ), SlidingWindowMultiplier( add, dbl, 3, None, ProcessingDirection.LTR, AccumulationOrder.PeqPR, True ), diff --git a/test/sca/test_target.py b/test/sca/test_target.py index 6b8a8c7..a5a58e4 100644 --- a/test/sca/test_target.py +++ b/test/sca/test_target.py @@ -37,7 +37,7 @@ from pyecsca.sca.target.ectester import ( if has_pyscard: from pyecsca.sca.target.ectester import ECTesterTargetPCSC as ECTesterTarget else: - from pyecsca.sca.target.ectester import ECTesterTarget + from pyecsca.sca.target.ectester import ECTesterTarget # type: ignore class TestTarget(SimpleSerialTarget, BinaryTarget): @@ -98,8 +98,8 @@ def target(): pytest.skip(f"No reader found: {e}") if not rs: pytest.skip("No reader found") - reader = rs[0] - target: ECTesterTarget = ECTesterTarget(reader) + reader = rs[0] # type: ignore + target: ECTesterTarget = ECTesterTarget(reader) # This will not instantiate an abstract class, skipcq: PYL-E0110 target.connect() if not target.select_applet(): target.disconnect() -- cgit v1.2.3-70-g09d2