@@ -88,7 +88,6 @@ def _fetch_strategy( # noqa: D417
8888 ],
8989 system_type : Type [System ],
9090 test_template_type : Type [TestTemplate ],
91- env_vars : Dict [str , Any ],
9291 cmd_args : Dict [str , Any ],
9392 ) -> Optional [
9493 Union [
@@ -108,7 +107,6 @@ def _fetch_strategy( # noqa: D417
108107 The strategy interface to fetch.
109108 system_type (Type[System]): The system type.
110109 test_template_type (Type[TestTemplate]): The test template type.
111- env_vars (Dict[str, Any]): Environment variables.
112110 cmd_args (Dict[str, Any]): Command-line arguments.
113111
114112 Returns:
@@ -119,7 +117,7 @@ def _fetch_strategy( # noqa: D417
119117 strategy_type = registry .strategies_map .get (key )
120118 if strategy_type :
121119 if issubclass (strategy_type , TestTemplateStrategy ):
122- return strategy_type (self .system , env_vars , cmd_args )
120+ return strategy_type (self .system , cmd_args )
123121 else :
124122 return strategy_type ()
125123
@@ -128,13 +126,12 @@ def _fetch_strategy( # noqa: D417
128126 )
129127 return None
130128
131- def _get_test_template (self , name : str , env_vars : Dict [ str , Any ], cmd_args : Dict [str , Any ]) -> TestTemplate :
129+ def _get_test_template (self , name : str , cmd_args : Dict [str , Any ]) -> TestTemplate :
132130 """
133131 Dynamically retrieves the appropriate TestTemplate subclass based on the given name.
134132
135133 Args:
136134 name (str): The name of the test template.
137- env_vars (Dict[str, Any]): Environment variables.
138135 cmd_args (Dict[str, Any]): Command-line arguments.
139136
140137 Returns:
@@ -146,32 +143,32 @@ def _get_test_template(self, name: str, env_vars: Dict[str, Any], cmd_args: Dict
146143 if not test_template_class :
147144 raise ValueError (f"Unsupported test_template name: { name } " )
148145
149- obj = test_template_class (system = self .system , name = name , env_vars = env_vars , cmd_args = cmd_args )
146+ obj = test_template_class (system = self .system , name = name , cmd_args = cmd_args )
150147 obj .install_strategy = cast (
151- InstallStrategy , self ._fetch_strategy (InstallStrategy , type (obj .system ), type (obj ), env_vars , cmd_args )
148+ InstallStrategy , self ._fetch_strategy (InstallStrategy , type (obj .system ), type (obj ), cmd_args )
152149 )
153150 obj .command_gen_strategy = cast (
154151 CommandGenStrategy ,
155- self ._fetch_strategy (CommandGenStrategy , type (obj .system ), type (obj ), env_vars , cmd_args ),
152+ self ._fetch_strategy (CommandGenStrategy , type (obj .system ), type (obj ), cmd_args ),
156153 )
157154 obj .json_gen_strategy = cast (
158155 JsonGenStrategy ,
159- self ._fetch_strategy (JsonGenStrategy , type (obj .system ), type (obj ), env_vars , cmd_args ),
156+ self ._fetch_strategy (JsonGenStrategy , type (obj .system ), type (obj ), cmd_args ),
160157 )
161158 obj .job_id_retrieval_strategy = cast (
162159 JobIdRetrievalStrategy ,
163- self ._fetch_strategy (JobIdRetrievalStrategy , type (obj .system ), type (obj ), env_vars , cmd_args ),
160+ self ._fetch_strategy (JobIdRetrievalStrategy , type (obj .system ), type (obj ), cmd_args ),
164161 )
165162 obj .job_status_retrieval_strategy = cast (
166163 JobStatusRetrievalStrategy ,
167- self ._fetch_strategy (JobStatusRetrievalStrategy , type (obj .system ), type (obj ), env_vars , cmd_args ),
164+ self ._fetch_strategy (JobStatusRetrievalStrategy , type (obj .system ), type (obj ), cmd_args ),
168165 )
169166 obj .report_generation_strategy = cast (
170167 ReportGenerationStrategy ,
171- self ._fetch_strategy (ReportGenerationStrategy , type (obj .system ), type (obj ), env_vars , cmd_args ),
168+ self ._fetch_strategy (ReportGenerationStrategy , type (obj .system ), type (obj ), cmd_args ),
172169 )
173170 obj .grading_strategy = cast (
174- GradingStrategy , self ._fetch_strategy (GradingStrategy , type (obj .system ), type (obj ), env_vars , cmd_args )
171+ GradingStrategy , self ._fetch_strategy (GradingStrategy , type (obj .system ), type (obj ), cmd_args )
175172 )
176173 return obj
177174
@@ -187,7 +184,6 @@ def _parse_data(self, data: Dict[str, Any]) -> Test:
187184 """
188185 test_def = self .load_test_definition (data )
189186
190- env_vars = {} # this field doesn't exist in Test or TestTemplate TOMLs
191187 """
192188 There are:
193189 1. global_env_vars, used in System
@@ -198,7 +194,7 @@ def _parse_data(self, data: Dict[str, Any]) -> Test:
198194 extra_cmd_args = test_def .extra_args_str
199195
200196 test_template_name = data .get ("test_template_name" , "" )
201- test_template = self ._get_test_template (test_template_name , env_vars , cmd_args )
197+ test_template = self ._get_test_template (test_template_name , cmd_args )
202198
203199 if not test_template :
204200 test_name = data .get ("name" , "Unnamed Test" )
@@ -214,7 +210,6 @@ def _parse_data(self, data: Dict[str, Any]) -> Test:
214210 name = test_def .name ,
215211 description = data .get ("description" , "" ),
216212 test_template = test_template ,
217- env_vars = env_vars ,
218213 cmd_args = cmd_args ,
219214 extra_env_vars = extra_env_vars ,
220215 extra_cmd_args = extra_cmd_args ,
0 commit comments