aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/sca
diff options
context:
space:
mode:
authorJ08nY2023-08-08 14:04:51 +0200
committerJ08nY2023-08-08 14:04:51 +0200
commit109fec027766630166083c497ea0f0e8052965a4 (patch)
treeb2c5bac0a11c30627f542d98d7c49ace358081d6 /test/sca
parent5e3b6529f8c868b01a1407a6adc2c6b1a74771fb (diff)
downloadpyecsca-109fec027766630166083c497ea0f0e8052965a4.tar.gz
pyecsca-109fec027766630166083c497ea0f0e8052965a4.tar.zst
pyecsca-109fec027766630166083c497ea0f0e8052965a4.zip
Initial move to pytest.
Diffstat (limited to 'test/sca')
-rw-r--r--test/sca/test_align.py7
-rw-r--r--test/sca/utils.py10
2 files changed, 4 insertions, 13 deletions
diff --git a/test/sca/test_align.py b/test/sca/test_align.py
index aca0f2f..5820171 100644
--- a/test/sca/test_align.py
+++ b/test/sca/test_align.py
@@ -1,4 +1,5 @@
import numpy as np
+import pytest
from importlib.resources import files, as_file
from pyecsca.sca import (
align_correlation,
@@ -10,7 +11,7 @@ from pyecsca.sca import (
InspectorTraceSet,
)
import test.data.sca
-from .utils import Plottable, slow
+from .utils import Plottable
class AlignTests(Plottable):
@@ -43,7 +44,7 @@ class AlignTests(Plottable):
self.assertEqual(offsets[0], 0)
self.assertEqual(offsets[1], 3)
- @slow
+ @pytest.mark.slow
def test_large_align(self):
with as_file(files(test.data.sca).joinpath("example.trs")) as path:
example = InspectorTraceSet.read(path)
@@ -52,7 +53,7 @@ class AlignTests(Plottable):
)
self.assertIsNotNone(result)
- @slow
+ @pytest.mark.slow
def test_large_dtw_align(self):
with as_file(files(test.data.sca).joinpath("example.trs")) as path:
example = InspectorTraceSet.read(path)
diff --git a/test/sca/utils.py b/test/sca/utils.py
index b00015b..ad77d21 100644
--- a/test/sca/utils.py
+++ b/test/sca/utils.py
@@ -10,16 +10,6 @@ from pyecsca.sca import Trace
force_plot = True
-def slow(func):
- func.slow = 1
- return func
-
-
-def disabled(func):
- func.disabled = 1
- return func
-
-
cases: Dict[str, int] = {}