Remove incorrect test file
- Removed test_basic.py which had incorrect imports - test_tools.py provides comprehensive tool testing - Repository is now clean and consistent
This commit is contained in:
parent
ca98d75075
commit
cb7188d857
@ -1,65 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
"""
|
|
||||||
Basic functionality test for PicoGent
|
|
||||||
"""
|
|
||||||
|
|
||||||
import asyncio
|
|
||||||
import tempfile
|
|
||||||
import os
|
|
||||||
from picogent import Config, Session, run_agent
|
|
||||||
|
|
||||||
|
|
||||||
async def test_basic_functionality():
|
|
||||||
"""Test basic agent functionality"""
|
|
||||||
print("🧪 Testing PicoGent basic functionality...")
|
|
||||||
|
|
||||||
# Create a test config
|
|
||||||
config = Config(
|
|
||||||
provider="anthropic",
|
|
||||||
model="claude-sonnet-4-20250514",
|
|
||||||
api_key="test-key", # Fake key for testing
|
|
||||||
max_tokens=1000,
|
|
||||||
max_iterations=3,
|
|
||||||
workspace="."
|
|
||||||
)
|
|
||||||
|
|
||||||
print("✅ Config created successfully")
|
|
||||||
|
|
||||||
# Test session creation
|
|
||||||
session = Session()
|
|
||||||
session.add_message("user", "Hello, world!")
|
|
||||||
session.add_message("assistant", "Hello! How can I help you?")
|
|
||||||
|
|
||||||
messages = session.get_messages()
|
|
||||||
assert len(messages) == 2
|
|
||||||
assert messages[0]["role"] == "user"
|
|
||||||
assert messages[1]["role"] == "assistant"
|
|
||||||
|
|
||||||
print("✅ Session management working")
|
|
||||||
|
|
||||||
# Test tools import and registration
|
|
||||||
from picogent.tools import registry, ReadTool, WriteTool, EditTool, BashTool
|
|
||||||
|
|
||||||
# Should have some tools registered
|
|
||||||
tools = registry.list_tools()
|
|
||||||
print(f"✅ {len(tools)} tools registered: {[t.name for t in tools]}")
|
|
||||||
|
|
||||||
# Test tool definitions
|
|
||||||
definitions = registry.get_tool_definitions()
|
|
||||||
assert len(definitions) > 0
|
|
||||||
assert all("name" in tool for tool in definitions)
|
|
||||||
|
|
||||||
print("✅ Tool definitions generated successfully")
|
|
||||||
|
|
||||||
# Test providers
|
|
||||||
from picogent.providers import AnthropicProvider
|
|
||||||
provider = AnthropicProvider(config)
|
|
||||||
|
|
||||||
print("✅ Anthropic provider created successfully")
|
|
||||||
|
|
||||||
print("✅ All basic tests passed!")
|
|
||||||
print("\n📝 Note: To test actual API functionality, set a valid ANTHROPIC_API_KEY environment variable")
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
asyncio.run(test_basic_functionality())
|
|
||||||
Loading…
Reference in New Issue
Block a user