From fd83b1536c073fd75ac0a43bf02bf918850a4976 Mon Sep 17 00:00:00 2001 From: wangpeng Date: Thu, 5 Dec 2024 19:52:58 +0800 Subject: [PATCH] fix 6068:Make the test class dependencies fulfill all the tests. Signed-off-by: wangpeng --- avocado/core/nrunner/runnable.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/avocado/core/nrunner/runnable.py b/avocado/core/nrunner/runnable.py index 7669f5835b..9fda66a9c9 100644 --- a/avocado/core/nrunner/runnable.py +++ b/avocado/core/nrunner/runnable.py @@ -10,6 +10,8 @@ import pkg_resources +from copy import deepcopy + try: import jsonschema @@ -402,13 +404,14 @@ def read_dependencies(self, dependencies_dict): :returns: Runnable dependencies in avocado.core.dependencies.dependency.Dependency format. :rtype: list of Dependency """ - if isinstance(dependencies_dict, list): + new_dependencies_dict = deepcopy(dependencies_dict) + if isinstance(new_dependencies_dict, list): return list( map( lambda d: ( Dependency.from_dictionary(d) if isinstance(d, dict) else d ), - dependencies_dict, + new_dependencies_dict, ) )