Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions tests/cli/config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,8 +476,10 @@ def test_obtain_reward_fn_file_not_found(self):
def test_obtain_reward_fn_absolute_path_outside_project(self):
"""Tests loading a reward function from an absolute FILE path outside the project root."""
hp = self.initialize_config([])
tmp_dir = self.create_tempdir()
tmp_dir_str = tmp_dir.full_path
try:
tmp_dir_str = self.create_tempdir().full_path
except Exception: # pylint: disable=broad-except
tmp_dir_str = tempfile.TemporaryDirectory().name
external_root = Path(tmp_dir_str) / "some_other_project"
external_root.mkdir()
external_module_file = external_root / "external_reward.py"
Expand Down
Loading