Skip to content

Commit 125c88d

Browse files
committed
update tests
1 parent bd84c02 commit 125c88d

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

tests/functional/test_runtime_parameters.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,8 +222,8 @@ def _test_custom_model_with_runtime_params(
222222
if docker:
223223
cmd += " --docker {} --verbose ".format(docker)
224224

225-
_, stdout, _ = _exec_shell_cmd(cmd, err_msg=None, assert_if_fail=False, env=env)
226-
return stdout
225+
_, stdout, stderr = _exec_shell_cmd(cmd, err_msg=None, assert_if_fail=False, env=env)
226+
return stdout, stderr
227227

228228
@classmethod
229229
def _setup_runtime_parameters(
@@ -251,20 +251,20 @@ def _setup_runtime_parameters(
251251
def test_runtime_parameters_invalid_yaml(
252252
self, resources, tmp_path, runtime_param_values_stream, use_runtime_params_env_var
253253
):
254-
stdout = self._test_custom_model_with_runtime_params(
254+
stdout, stderr = self._test_custom_model_with_runtime_params(
255255
resources,
256256
tmp_path,
257257
runtime_param_values_stream,
258258
is_invalid_yaml=True,
259259
use_runtime_params_env_var=use_runtime_params_env_var,
260260
)
261-
assert "Invalid runtime parameter values YAML content!" in stdout
261+
assert "Invalid runtime parameter values YAML content!" in stdout + stderr
262262

263263
@pytest.mark.parametrize("use_runtime_params_env_var", [True, False])
264264
def test_runtime_parameters_missing_attr(
265265
self, resources, tmp_path, runtime_param_values_stream, use_runtime_params_env_var
266266
):
267-
stdout = self._test_custom_model_with_runtime_params(
267+
stdout, stderr = self._test_custom_model_with_runtime_params(
268268
resources,
269269
tmp_path,
270270
runtime_param_values_stream,
@@ -273,27 +273,27 @@ def test_runtime_parameters_missing_attr(
273273
)
274274
assert re.search(
275275
r".*Failed to load runtime parameter.*{\\'credentialType\\': DataError\(\\'is required\\'\)}.*",
276-
stdout,
276+
stdout + stderr,
277277
)
278278

279279
def test_runtime_parameters_boolean_invalid(
280280
self, resources, tmp_path, runtime_param_values_stream
281281
):
282-
stderr = self._test_custom_model_with_runtime_params(
282+
stdout, stderr = self._test_custom_model_with_runtime_params(
283283
resources, tmp_path, runtime_param_values_stream, bool_var_value="text"
284284
)
285285
assert re.search(
286286
r".*Failed to load runtime parameter.*value should be True or False.*",
287-
stderr,
287+
stdout + stderr,
288288
)
289289

290290
def test_runtime_parameters_numeric_invalid(
291291
self, resources, tmp_path, runtime_param_values_stream
292292
):
293-
stderr = self._test_custom_model_with_runtime_params(
293+
stdout, stderr = self._test_custom_model_with_runtime_params(
294294
resources, tmp_path, runtime_param_values_stream, numeric_var_value="text"
295295
)
296296
assert re.search(
297297
r".*Failed to load runtime parameter.*value can.*t be converted to float.*",
298-
stderr,
298+
stdout + stderr,
299299
)

0 commit comments

Comments
 (0)