testsAndMisc-archive/python_pkg/keyboard_coop/tests/conftest.py

15 lines
338 B
Python
Raw Permalink Normal View History

"""Shared fixtures for keyboard_coop tests."""
from __future__ import annotations
from unittest.mock import MagicMock, patch
import pytest
@pytest.fixture(autouse=True)
def mock_pygame() -> MagicMock:
"""Mock pygame to prevent display initialization."""
with patch.dict("sys.modules", {"pygame": MagicMock()}):
yield