mirror of
https://github.com/Hopiu/bowser.git
synced 2026-03-16 19:10:24 +00:00
- 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
22 lines
505 B
Python
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
|