Files
wehub-resource-sync db1d565b64
Integration Tests / melodic (push) Has been cancelled
Integration Tests / noetic (push) Has been cancelled
Integration Tests / humble (push) Has been cancelled
Integration Tests / jazzy (push) Has been cancelled
Ruff Lint & Format / ruff (push) Has been cancelled
Sync main to develop / Check if sync is needed (push) Has been cancelled
Sync main to develop / Sync main to develop (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:36:23 +08:00

27 lines
898 B
Python

"""Shared fixtures for unit tests."""
import pytest
# ---------------------------------------------------------------------------
# Robot config fixtures (used by test_config_utils.py)
# ---------------------------------------------------------------------------
@pytest.fixture
def valid_robot_yaml(tmp_path):
"""Create a temporary valid robot YAML file and return (specs_dir, robot_name)."""
yaml_content = (
"name: test_robot\ntype: simulated\nprompts: |\n This is a test robot for unit testing.\n"
)
yaml_file = tmp_path / "test_robot.yaml"
yaml_file.write_text(yaml_content)
return str(tmp_path), "test_robot"
@pytest.fixture
def empty_robot_yaml(tmp_path):
"""Create a temporary empty YAML file and return (specs_dir, robot_name)."""
yaml_file = tmp_path / "empty_robot.yaml"
yaml_file.write_text("")
return str(tmp_path), "empty_robot"