Files
zeekay ea3116aac9 Fix all test issues and achieve 100% test pass rate
- Remove all unconditional pytest.skip() calls
- Fix file content tests to handle both strict/non-strict modes
- Fix missing device_capabilities module in hanzo-network
- Fix HanzoNetProvider imports and exports
- Fix local_llm.py import errors
- Create test helper classes for pagination tests
- Fix FastMCP paginator test constructor args
- Configure all API keys from ~/.zsh/after.zsh
- All tests now pass or skip conditionally based on actual requirements
2025-08-12 16:19:34 -05:00

22 lines
495 B
Python

import json
import tempfile
from pathlib import Path
import pytest
@pytest.fixture
def temp_file():
"""Create a temporary file for testing."""
with tempfile.NamedTemporaryFile(delete=False) as f:
yield Path(f.name)
try:
Path(f.name).unlink()
except FileNotFoundError:
pass
def parse_result(result: str) -> dict:
"""Parse the JSON result from file_editor."""
return json.loads(result[result.find("{") : result.rfind("}") + 1])