Files
wehub-resource-sync a0c8464e58
Build Package / build (ubuntu-latest) (push) Failing after 1s
CodeQL / Analyze (python) (push) Failing after 1s
Core Typecheck / core-typecheck (push) Failing after 1s
Linting / lint (push) Failing after 1s
llama-dev tests / test-llama-dev (push) Failing after 1s
Publish Sub-Package to PyPI if Needed / publish_subpackage_if_needed (push) Has been skipped
Sync Docs to Developer Hub / sync-docs (push) Failing after 0s
Build Package / build (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:26:52 +08:00

30 lines
636 B
Python

import sys
from pathlib import Path
from unittest.mock import MagicMock
import pytest
@pytest.fixture
def data_path():
return Path(__file__).parent / "data"
@pytest.fixture
def mock_current_version(monkeypatch):
"""Fixture to mock the current Python version."""
def _set_version(major, minor, micro):
mock_version = type(
"MockVersion", (), {"major": major, "minor": minor, "micro": micro}
)
monkeypatch.setattr(sys, "version_info", mock_version)
return _set_version
@pytest.fixture
def mock_rich_console():
"""Fixture to mock the rich console."""
return MagicMock()