diff options
| author | Tomáš Jusko | 2023-12-19 03:06:47 +0100 |
|---|---|---|
| committer | Tomáš Jusko | 2023-12-19 03:06:47 +0100 |
| commit | de8243ee0ac94ca1e09f81cf3130c691324abd4a (patch) | |
| tree | 3e2f390f5a7e28341d9a48301bdbc2f527435db9 | |
| parent | 47f474438121c7b41fd3f1ff2f2bff9bc2850287 (diff) | |
| download | pyecsca-de8243ee0ac94ca1e09f81cf3130c691324abd4a.tar.gz pyecsca-de8243ee0ac94ca1e09f81cf3130c691324abd4a.tar.zst pyecsca-de8243ee0ac94ca1e09f81cf3130c691324abd4a.zip | |
Fixed skipping tests when CUDA is not available
| -rw-r--r-- | test/sca/test_stacked_combine.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/test/sca/test_stacked_combine.py b/test/sca/test_stacked_combine.py index 68d422c..7941b46 100644 --- a/test/sca/test_stacked_combine.py +++ b/test/sca/test_stacked_combine.py @@ -25,9 +25,7 @@ def samples(): class Base: @pytest.fixture() - def gpu_manager(self, samples): - if not cuda.is_available(): - pytest.skip("CUDA not available") + def gpu_manager(self): raise NotImplementedError("Subclasses should implement this") def test_average(self, samples, gpu_manager): @@ -89,12 +87,16 @@ class Base: class TestNonChunked(Base): @pytest.fixture() def gpu_manager(self, samples): + if not cuda.is_available(): + pytest.skip("CUDA not available") return GPUTraceManager(StackedTraces(samples), TPB) class TestChunked(Base): @pytest.fixture() def gpu_manager(self, samples): + if not cuda.is_available(): + pytest.skip("CUDA not available") return GPUTraceManager(StackedTraces(samples), TPB, chunk_size=CHUNK_SIZE, |
