diff --git a/tests/helpers.py b/tests/helpers.py index b541ed28ec..97897b8e88 100644 --- a/tests/helpers.py +++ b/tests/helpers.py @@ -8,7 +8,11 @@ from contextlib import AbstractContextManager, contextmanager from typing import Any, AsyncContextManager, Awaitable, ContextManager, Generator, TypeVar, cast, overload -import picologging +try: + import picologging +except ImportError: + import logging as picologging + from _pytest.logging import LogCaptureHandler, _LiveLoggingNullHandler from litestar._openapi.schema_generation import SchemaCreator