mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-27 04:20:09 +00:00
- 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
22 lines
495 B
Python
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])
|