From 8b7c31bd4d217a9d39fac499fcb0006ce14200ad Mon Sep 17 00:00:00 2001 From: "Risbud, Sumedh" Date: Wed, 15 May 2024 18:47:39 -0700 Subject: [PATCH] Fixed a unittest by adding .name attribute to a Mock object Signed-off-by: Risbud, Sumedh --- tests/lava/magma/compiler/test_compiler.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/lava/magma/compiler/test_compiler.py b/tests/lava/magma/compiler/test_compiler.py index 1046253c3..2153bf88b 100644 --- a/tests/lava/magma/compiler/test_compiler.py +++ b/tests/lava/magma/compiler/test_compiler.py @@ -179,8 +179,11 @@ def create_mock_proc_groups() -> ty.List[ProcGroup]: ] # Add mock PyProcModel instances to each of the Processes. + j = 1 for p, pm_type in zip(proc_list, proc_model_types): type(p).model_class = PropertyMock(return_value=pm_type) + type(p).name = PropertyMock(return_value=f"Process{j}") + j += 1 seal(p) proc_groups = [