mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-26 03:45:38 +01:00
Merge pull request #2966 from dgreen-arm/fix-pylint-warnings
Sideport: Fix some pylint warnings
This commit is contained in:
commit
252faff19f
@ -26,6 +26,7 @@ import re
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
class Results:
|
class Results:
|
||||||
|
"""Store file and line information about errors or warnings in test suites."""
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.errors = 0
|
self.errors = 0
|
||||||
self.warnings = 0
|
self.warnings = 0
|
||||||
@ -41,6 +42,7 @@ class Results:
|
|||||||
self.warnings += 1
|
self.warnings += 1
|
||||||
|
|
||||||
def collect_test_directories():
|
def collect_test_directories():
|
||||||
|
"""Get the relative path for the TLS and Crypto test directories."""
|
||||||
if os.path.isdir('tests'):
|
if os.path.isdir('tests'):
|
||||||
tests_dir = 'tests'
|
tests_dir = 'tests'
|
||||||
elif os.path.isdir('suites'):
|
elif os.path.isdir('suites'):
|
||||||
@ -55,6 +57,7 @@ def collect_test_directories():
|
|||||||
return directories
|
return directories
|
||||||
|
|
||||||
def check_description(results, seen, file_name, line_number, description):
|
def check_description(results, seen, file_name, line_number, description):
|
||||||
|
"""Check test case descriptions for errors."""
|
||||||
if description in seen:
|
if description in seen:
|
||||||
results.error(file_name, line_number,
|
results.error(file_name, line_number,
|
||||||
'Duplicate description (also line {})',
|
'Duplicate description (also line {})',
|
||||||
|
@ -310,7 +310,10 @@ class MbedTlsTest(BaseHostTest):
|
|||||||
|
|
||||||
param_bytes, length = self.test_vector_to_bytes(function_id,
|
param_bytes, length = self.test_vector_to_bytes(function_id,
|
||||||
dependencies, args)
|
dependencies, args)
|
||||||
self.send_kv(''.join('{:02x}'.format(x) for x in length), ''.join('{:02x}'.format(x) for x in param_bytes))
|
self.send_kv(
|
||||||
|
''.join('{:02x}'.format(x) for x in length),
|
||||||
|
''.join('{:02x}'.format(x) for x in param_bytes)
|
||||||
|
)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_result(value):
|
def get_result(value):
|
||||||
|
Loading…
Reference in New Issue
Block a user