15 lines
369 B
Python
15 lines
369 B
Python
from typing import TYPE_CHECKING
|
|
from typing import Any
|
|
|
|
import pytest
|
|
import zeal # pyright: ignore[reportMissingTypeStubs]
|
|
|
|
if TYPE_CHECKING:
|
|
from collections.abc import Generator
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
|
def use_zeal() -> Generator[None, Any]:
|
|
"""Enable Zeal N+1 detection context for each pytest test."""
|
|
with zeal.zeal_context():
|
|
yield
|