aboutsummaryrefslogtreecommitdiffstats
path: root/src/scripts/cli_tests.py
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2017-04-16 19:12:58 +0200
committerSimon Warta <[email protected]>2017-04-18 09:37:41 +0200
commit7fe500991e84c93d082e799c89df212aee9aa5ed (patch)
tree4531e3a9b5fb8bf3fa505825f843ba21f2fee3d6 /src/scripts/cli_tests.py
parentb217a4fccda97d310c7255bd099b674281016571 (diff)
Some linting cleanups for cli_tests.py
Diffstat (limited to 'src/scripts/cli_tests.py')
-rwxr-xr-xsrc/scripts/cli_tests.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/scripts/cli_tests.py b/src/scripts/cli_tests.py
index ce96a43f7..757de654d 100755
--- a/src/scripts/cli_tests.py
+++ b/src/scripts/cli_tests.py
@@ -6,11 +6,11 @@ import unittest
import argparse
import re
import subprocess
-import vecparser
import sys
+import vecparser
+
cli_binary = ""
-testdata = {}
SUPPORTED_ALGORITHMS = [
'AES-128/CFB',
@@ -106,8 +106,8 @@ def get_testdata(document):
testcase_number += 1
for direction in ['encrypt', 'decrypt']:
testname = "{} no {:0>3} ({})".format(
- algorithm.lower(), testcase_number, direction)
- testname = re.sub("[^a-z0-9\-]", "_", testname)
+ algorithm.lower(), testcase_number, direction)
+ testname = re.sub("[^-a-z0-9-]", "_", testname)
testname = re.sub("_+", "_", testname)
testname = testname.strip("_")
out[testname] = {}
@@ -139,7 +139,7 @@ if __name__ == '__main__':
# i += 1
# print(str(i) + ":", testcase)
- testdata = OrderedDict();
+ testdata = OrderedDict()
append_ordered(testdata, get_testdata(vecfile_cfb.get_data()))
append_ordered(testdata, get_testdata(vecfile_gcm.get_data()))
append_ordered(testdata, get_testdata(vecfile_ocb.get_data()))
@@ -150,7 +150,7 @@ if __name__ == '__main__':
# for key in testdata[testname]:
# print(" " + key + ": " + testdata[testname][key])
for testname in testdata:
- test_method = create_test (testdata[testname])
+ test_method = create_test(testdata[testname])
test_method.__name__ = 'test_%s' % testname
setattr(TestSequence, test_method.__name__, test_method)