bowser/tests/conftest.py
Benedikt Willi ae6fcbfab4 Add comprehensive test suite with pytest
- Add tests for URL parsing, cookies, HTML/CSS parsing
- Add tests for browser/tab management and history
- Add tests for layout and rendering components
- Configure pytest with coverage reporting
- Add test documentation and runner commands
- All 54 tests passing
2026-01-09 13:37:21 +01:00

22 lines
505 B
Python

"""Pytest configuration and fixtures."""
import pytest
import logging
@pytest.fixture(autouse=True)
def configure_logging():
"""Configure logging for tests."""
logging.basicConfig(
level=logging.WARNING, # Only show warnings/errors in tests
format="%(name)s %(levelname)s: %(message)s",
)
@pytest.fixture
def mock_browser():
"""Create a mock browser for testing."""
from unittest.mock import Mock
browser = Mock()
browser._log = Mock()
return browser