浏览代码

Curriculum tests updated to match develop branch.

/develop-generalizationTraining-TrainerController
Deric Pang 7 年前
当前提交
c754e9db
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 4
      python/tests/test_curriculum.py

4
python/tests/test_curriculum.py


import json
from unittest.mock import patch, mock_open
from unityagents import UnityEnvironmentException
from unitytrainers.exception import CurriculumError
from unitytrainers import Curriculum

@patch('builtins.open', new_callable=mock_open, read_data=bad_curriculum_json_str)
def test_init_curriculum_bad_curriculum_raises_error(mock_file, location, default_reset_parameters):
with pytest.raises(UnityEnvironmentException):
with pytest.raises(CurriculumError):
Curriculum(location, default_reset_parameters)

正在加载...
取消
保存