From 20a8dea0dd0c601297501c29a49610d4d4a4b1b4 Mon Sep 17 00:00:00 2001 From: anabwan <46447582+anabwan@users.noreply.github.com> Date: Mon, 15 Apr 2019 12:28:23 +0300 Subject: [PATCH] tests: minor fix for functional tests (#289) * tests: minor fix for functional tests * tests: fix value --- rl_coach/tests/test_checkpoint.py | 2 +- rl_coach/tests/utils/args_utils.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/rl_coach/tests/test_checkpoint.py b/rl_coach/tests/test_checkpoint.py index 1da9f4a..1884bc3 100644 --- a/rl_coach/tests/test_checkpoint.py +++ b/rl_coach/tests/test_checkpoint.py @@ -91,7 +91,7 @@ def test_restore_checkpoint(preset_args, clres, framework, return p if framework == "mxnet": - preset_args = Def.Presets.mxnet_args_test + preset_args = Def.Presets.mxnet_args_test[0] p_valid_params = p_utils.validation_params(preset_args) create_cp_proc = _create_cmd_and_run(flag=['--checkpoint_save_secs', '5']) diff --git a/rl_coach/tests/utils/args_utils.py b/rl_coach/tests/utils/args_utils.py index e0b0c48..3384faf 100644 --- a/rl_coach/tests/utils/args_utils.py +++ b/rl_coach/tests/utils/args_utils.py @@ -395,6 +395,10 @@ def validate_arg_result(flag, p_valid_params, clres=None, process=None, results.append(last_step[-1]) time.sleep(1) + # get the first value after heat-up + time.sleep(1) + results.append(csv["Total steps"].values[-1]) + assert int(results[-1]) >= Def.Consts.num_hs, \ Def.Consts.ASSERT_MSG.format("bigger than " + str(Def.Consts.num_hs), results[-1])