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
Fixture to mock the current Python version.
llama-dev/tests/conftest.py