mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
27 lines
785 B
Python
27 lines
785 B
Python
import os
|
|
from pathlib import Path
|
|
|
|
from evaluation.utils.shared import get_openhands_config_for_eval
|
|
|
|
|
|
def test_eval_file_store_defaults_to_repo_local(tmp_path, monkeypatch):
|
|
prev_cwd = Path.cwd()
|
|
try:
|
|
os.chdir(tmp_path)
|
|
cfg = get_openhands_config_for_eval()
|
|
assert Path(cfg.file_store_path) == (tmp_path / '.eval_sessions').resolve()
|
|
assert cfg.file_store == 'local'
|
|
finally:
|
|
os.chdir(prev_cwd)
|
|
|
|
|
|
def test_eval_file_store_is_hard_coded_repo_local(tmp_path):
|
|
prev_cwd = Path.cwd()
|
|
try:
|
|
os.chdir(tmp_path)
|
|
cfg = get_openhands_config_for_eval()
|
|
assert Path(cfg.file_store_path) == (tmp_path / '.eval_sessions').resolve()
|
|
assert cfg.file_store == 'local'
|
|
finally:
|
|
os.chdir(prev_cwd)
|