From beda8b21be366b33a80e224cb03b43874accfa62 Mon Sep 17 00:00:00 2001 From: Joshua Tang Date: Wed, 14 Feb 2024 18:40:46 +1100 Subject: [PATCH] test: add `conftest` to reset abstract processors --- tests/conftest.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/conftest.py diff --git a/tests/conftest.py b/tests/conftest.py new file mode 100644 index 000000000000..5eb26cea2b69 --- /dev/null +++ b/tests/conftest.py @@ -0,0 +1,12 @@ +import pytest + +from pdf_bot.file_processor import AbstractFileProcessor +from pdf_bot.image_processor import AbstractImageProcessor +from pdf_bot.pdf_processor import AbstractPdfProcessor + + +@pytest.fixture(autouse=True) +def _after_test() -> None: + AbstractFileProcessor._FILE_PROCESSORS = {} # noqa: SLF001 + AbstractImageProcessor._IMAGE_PROCESSORS = {} # noqa: SLF001 + AbstractPdfProcessor._PDF_PROCESSORS = {} # noqa: SLF001