mirror of
https://github.com/hanzoai/python-sdk.git
synced 2026-10-26 11:49:36 +00:00
Run ruff check --fix and ruff format across the repo to fix ~495 auto-fixable lint errors (mostly I001 import sorting) and reformat 225 files to match the py312 target. Co-authored-by: Hanzo Dev <[email protected]>
37 lines
837 B
Python
37 lines
837 B
Python
"""Tests for hanzo-tools-browser."""
|
|
|
|
import pytest
|
|
|
|
|
|
class TestImports:
|
|
"""Test that all modules can be imported."""
|
|
|
|
def test_import_package(self):
|
|
from hanzo_tools import browser
|
|
|
|
assert browser is not None
|
|
|
|
def test_import_tools(self):
|
|
from hanzo_tools.browser import TOOLS
|
|
|
|
assert len(TOOLS) > 0
|
|
|
|
def test_import_browser_tool(self):
|
|
from hanzo_tools.browser import BrowserTool
|
|
|
|
assert BrowserTool.name == "browser"
|
|
|
|
|
|
class TestBrowserTool:
|
|
"""Tests for BrowserTool."""
|
|
|
|
@pytest.fixture
|
|
def tool(self):
|
|
from hanzo_tools.browser import BrowserTool
|
|
|
|
return BrowserTool()
|
|
|
|
def test_has_description(self, tool):
|
|
assert tool.description
|
|
assert "browser" in tool.description.lower() or "playwright" in tool.description.lower()
|