aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ08nY2020-06-13 02:03:36 +0200
committerJ08nY2020-06-13 02:03:36 +0200
commitc1d8ed8ea202757db237ba870872b39a085b64a9 (patch)
tree9740d6c2b3cce807aee231aaac8c996345e7c8a8
parent4e17dfdb12707c814add7851c81eda4edb3dacde (diff)
downloadpyecsca-feature/ectester-target.tar.gz
pyecsca-feature/ectester-target.tar.bz2
pyecsca-feature/ectester-target.zip
Fix ECTester target test skip.feature/ectester-target
-rw-r--r--test/sca/test_target.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/sca/test_target.py b/test/sca/test_target.py
index 5519502..6c56d97 100644
--- a/test/sca/test_target.py
+++ b/test/sca/test_target.py
@@ -3,6 +3,8 @@ from os.path import realpath, dirname, join
from typing import Optional
from unittest import TestCase, SkipTest
+from smartcard.pcsc.PCSCExceptions import BaseSCardException
+
from pyecsca.ec.key_agreement import ECDH_SHA1
from pyecsca.ec.key_generation import KeyGeneration
from pyecsca.ec.mod import Mod
@@ -49,7 +51,10 @@ class ECTesterTargetTests(TestCase):
if not has_pyscard:
return
from smartcard.System import readers
- rs = readers()
+ try:
+ rs = readers()
+ except BaseSCardException:
+ return
if not rs:
return
cls.reader = rs[0]