File tree 1 file changed +16
-1
lines changed 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 17
17
Test cases for 'signer.py'.
18
18
"""
19
19
20
+ import sys
21
+ import unittest
22
+
20
23
import unittest
21
24
import securesystemslib .formats
22
25
import securesystemslib .keys as KEYS
23
- from securesystemslib .signer import Signature , SSlibSigner
24
26
from securesystemslib .exceptions import FormatError , UnsupportedAlgorithmError
25
27
28
+ # TODO: Remove case handling when fully dropping support for versions >= 3.6
29
+ IS_PY_VERSION_SUPPORTED = sys .version_info >= (3 , 6 )
30
+
31
+ # Use setUpModule to tell unittest runner to skip this test module gracefully.
32
+ def setUpModule ():
33
+ if not IS_PY_VERSION_SUPPORTED :
34
+ raise unittest .SkipTest ('requires Python 3.6 or higher' )
35
+
36
+ # Since setUpModule is called after imports we need to import conditionally.
37
+ if IS_PY_VERSION_SUPPORTED :
38
+ from securesystemslib .signer import Signature , SSlibSigner
39
+
40
+
26
41
class TestSSlibSigner (unittest .TestCase ):
27
42
28
43
@classmethod
You can’t perform that action at this time.
0 commit comments