@@ -84,10 +84,8 @@ def test_prepare_toolchain_app_config(self, mock_config_init):
84
84
mock_target = namedtuple ("Target" ,
85
85
"init_hooks name features core" )(lambda _ , __ : None ,
86
86
"Junk" , [], "Cortex-M3" )
87
- mock_config_init .return_value = namedtuple ("Config" ,
88
- "target has_regions" )(
89
- mock_target ,
90
- False )
87
+ mock_config_init .return_value = namedtuple (
88
+ "Config" , "target has_regions name" )(mock_target , False , None )
91
89
92
90
prepare_toolchain (self .src_paths , None , self .target , self .toolchain_name ,
93
91
app_config = app_config )
@@ -106,10 +104,8 @@ def test_prepare_toolchain_no_app_config(self, mock_config_init):
106
104
mock_target = namedtuple ("Target" ,
107
105
"init_hooks name features core" )(lambda _ , __ : None ,
108
106
"Junk" , [], "Cortex-M3" )
109
- mock_config_init .return_value = namedtuple ("Config" ,
110
- "target has_regions" )(
111
- mock_target ,
112
- False )
107
+ mock_config_init .return_value = namedtuple (
108
+ "Config" , "target has_regions name" )(mock_target , False , None )
113
109
114
110
prepare_toolchain (self .src_paths , None , self .target , self .toolchain_name )
115
111
@@ -133,7 +129,8 @@ def test_build_project_app_config(self, mock_prepare_toolchain, mock_exists, _,
133
129
app_config = "app_config"
134
130
mock_exists .return_value = False
135
131
mock_prepare_toolchain ().link_program .return_value = 1 , 2
136
- mock_prepare_toolchain ().config = namedtuple ("Config" , "has_regions" )(None )
132
+ mock_prepare_toolchain ().config = namedtuple (
133
+ "Config" , "has_regions name" )(None , None )
137
134
138
135
build_project (self .src_paths , self .build_path , self .target ,
139
136
self .toolchain_name , app_config = app_config )
@@ -161,7 +158,8 @@ def test_build_project_no_app_config(self, mock_prepare_toolchain, mock_exists,
161
158
mock_exists .return_value = False
162
159
# Needed for the unpacking of the returned value
163
160
mock_prepare_toolchain ().link_program .return_value = 1 , 2
164
- mock_prepare_toolchain ().config = namedtuple ("Config" , "has_regions" )(None )
161
+ mock_prepare_toolchain ().config = namedtuple (
162
+ "Config" , "has_regions name" )(None , None )
165
163
166
164
build_project (self .src_paths , self .build_path , self .target ,
167
165
self .toolchain_name )
0 commit comments