File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 2
2
3
3
"""Test cases for "signer.py". """
4
4
5
+ import sys
6
+ import unittest
7
+
5
8
import unittest
6
9
import securesystemslib .formats
7
10
import securesystemslib .keys as KEYS
8
- from securesystemslib .signer import Signature , SSlibSigner
9
11
from securesystemslib .exceptions import FormatError , UnsupportedAlgorithmError
10
12
13
+ # TODO: Remove case handling when fully dropping support for versions < 3.6
14
+ IS_PY_VERSION_SUPPORTED = sys .version_info >= (3 , 6 )
15
+
16
+ # Use setUpModule to tell unittest runner to skip this test module gracefully.
17
+ def setUpModule ():
18
+ if not IS_PY_VERSION_SUPPORTED :
19
+ raise unittest .SkipTest ("requires Python 3.6 or higher" )
20
+
21
+ # Since setUpModule is called after imports we need to import conditionally.
22
+ if IS_PY_VERSION_SUPPORTED :
23
+ from securesystemslib .signer import Signature , SSlibSigner
24
+
25
+
11
26
class TestSSlibSigner (unittest .TestCase ):
12
27
13
28
@classmethod
You can’t perform that action at this time.
0 commit comments