aboutsummaryrefslogtreecommitdiff
path: root/debug/testlib.py
diff options
context:
space:
mode:
authorTim Newsome <tim@sifive.com>2023-06-29 16:04:44 -0700
committerGitHub <noreply@github.com>2023-06-29 16:04:44 -0700
commit247e2334ef60654ad53ca1dd0a688dc1f0fccd33 (patch)
treeca07dba832efa7bb8b0c39b8913af107d25024f6 /debug/testlib.py
parent4b88f42a109e68903b1c0f5503c02a59d8d52e71 (diff)
parentfe15afe59efbd4a94fbd0f0855825e45a11775a6 (diff)
downloadriscv-tests-247e2334ef60654ad53ca1dd0a688dc1f0fccd33.zip
riscv-tests-247e2334ef60654ad53ca1dd0a688dc1f0fccd33.tar.gz
riscv-tests-247e2334ef60654ad53ca1dd0a688dc1f0fccd33.tar.bz2
Merge pull request #480 from riscv-software-src/pylint
Github workflow to run pylint against debug tests
Diffstat (limited to 'debug/testlib.py')
-rw-r--r--debug/testlib.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/debug/testlib.py b/debug/testlib.py
index 171123d..2155e05 100644
--- a/debug/testlib.py
+++ b/debug/testlib.py
@@ -952,14 +952,17 @@ def load_excluded_tests(excluded_tests_file, target_name):
return result
target_excludes = {}
- with open(excluded_tests_file) as file:
+ with open(excluded_tests_file, encoding="utf-8") as file:
raw_data = yaml.safe_load(file)
for (target, test_list) in raw_data.items():
if not isinstance(test_list, list):
- raise ValueError(f"Target {target!r} does not contain a test list", excluded_tests_file, test_list)
+ raise ValueError(
+ f"Target {target!r} does not contain a test list",
+ excluded_tests_file, test_list)
if not all(isinstance(s, str) for s in test_list):
- raise ValueError(f"Not every element in the target test list {target!r} is a string",
- excluded_tests_file, test_list)
+ raise ValueError(
+ f"Not every element in the target test list {target!r} "
+ "is a string", excluded_tests_file, test_list)
target_excludes.update(raw_data)