19 lines
388 B
Python
19 lines
388 B
Python
"""Fixture für die headless bediente Anwendung."""
|
|
|
|
import random
|
|
from collections.abc import Iterator
|
|
|
|
import pygame
|
|
import pytest
|
|
|
|
from sandbox.main import App
|
|
|
|
|
|
@pytest.fixture
|
|
def app() -> Iterator[App]:
|
|
"""Frische Anwendung mit reproduzierbaren Zufallsfarben."""
|
|
application = App(rng=random.Random(0))
|
|
pygame.event.clear()
|
|
yield application
|
|
application.close()
|