aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test/toolkit.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/toolkit.py')
-rw-r--r--test/toolkit.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/toolkit.py b/test/toolkit.py
index f8a74ba..4abdbf4 100644
--- a/test/toolkit.py
+++ b/test/toolkit.py
@@ -9,6 +9,7 @@ import logging
import os.path
import subprocess
+
class Algorithm(Enum):
@staticmethod
def parse(s):
@@ -50,6 +51,7 @@ class Mode(Enum):
def __str__(self):
return self.value
+
class BlockInput:
def __init__(self, key, plaintexts, iv=None):
self.key = key
@@ -63,6 +65,7 @@ class BlockInput:
args.extend(self.plaintexts)
return args
+
class Tools:
def __init__(self, search_dirs, use_sde=False):
if search_dirs:
@@ -82,14 +85,14 @@ class Tools:
def run(self, tool_path, args):
cmd_list = ['sde', '--', tool_path] if self._use_sde else [tool_path]
cmd_list.extend(args)
- logging.info('Trying to execute: ' + subprocess.list2cmdline(cmd_list))
+ logging.info('Trying to execute: %s', subprocess.list2cmdline(cmd_list))
try:
output = subprocess.check_output(
cmd_list, universal_newlines=True, stderr=subprocess.STDOUT)
except subprocess.CalledProcessError as e:
- logging.error('Output:\n' + e.output)
+ logging.error('Output:\n%s', e.output)
raise
- logging.info('Output:\n' + output)
+ logging.info('Output:\n%s', output)
return output.split()
@staticmethod