def test_execute(self, training_command):
finished = []
def done_callback(cmd, success, exit_code):
finished.append(True)
training_command._done_callback = done_callback
if DRY_RUN:
training_command._config_filepath = NOT_EXISTING_PATH
running_command = training_command.execute()
with pytest.raises(sh.ErrorReturnCode_1):
running_command.wait()
else:
running_command = training_command.execute()
running_command.wait()
assert len(finished) == 1 and finished[0]
hyperparam_search_test.py 文件源码
python
阅读 21
收藏 0
点赞 0
评论 0
评论列表
文章目录