17 lines
398 B
Python
17 lines
398 B
Python
"""Reset the plugin registry after each test so a test override never leaks into
|
|||
|
|
other suites that call ``create_app`` (which mounts discovered plugins)."""
|
||
|
|
|
||
|
|
from __future__ import annotations
|
||
|
|
|
||
|
|
from collections.abc import Iterator
|
||
|
|
|
||
|
|
import pytest
|
||
|
|
|
||
|
|
from app.plugins import loader
|
||
|
|
|
||
|
|
|
||
|
|
@pytest.fixture(autouse=True)
|
||
|
|
def _reset_plugins() -> Iterator[None]:
|
||
|
|
yield
|
||
|
|
loader.set_plugins_for_test(None)
|