Skip to content

Commit 8f1ec16

Browse files
committed
test_run.py: hoist name from test config
...and use this is a format string. This will help with later re-factoring. Signed-off-by: Alex Bennée <[email protected]>
1 parent 9dfe5b2 commit 8f1ec16

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test_run.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ def retrieve_test_list(config_file=f"{PARENT_DIR}/.buildkite/test_description.js
4848

4949
test_config = retrieve_test_list()
5050
for test in test_config["tests"]:
51+
name = test["test_name"]
5152
command = test["command"]
5253
command = command.replace("{target_platform}", platform.machine())
5354
test_func = make_test_function(command)
54-
setattr(TestsContainer, "test_{}".format(test["test_name"]), test_func)
55+
setattr(TestsContainer, f"test_{name}", test_func)
5556

5657
unittest.main(verbosity=2)

0 commit comments

Comments
 (0)