From a91903bf39877e866916db676f75cc67f1c7aeaa Mon Sep 17 00:00:00 2001 From: Ken Odegard Date: Thu, 9 Nov 2023 05:58:36 -0500 Subject: [PATCH] Move `urllib3_logger_error` to `conftest.py` (#13305) --- tests/cli/__init__.py | 9 --------- tests/cli/conftest.py | 11 +++++++++++ 2 files changed, 11 insertions(+), 9 deletions(-) create mode 100644 tests/cli/conftest.py diff --git a/tests/cli/__init__.py b/tests/cli/__init__.py index 7f604f92ee5..89baace7727 100644 --- a/tests/cli/__init__.py +++ b/tests/cli/__init__.py @@ -1,11 +1,2 @@ # Copyright (C) 2012 Anaconda, Inc # SPDX-License-Identifier: BSD-3-Clause -import logging - -import pytest - - -@pytest.fixture(autouse=True) -def urllib3_logger_error(caplog): - "Increasing the level to error to prevent retries show up in the stderr" - caplog.set_level(logging.ERROR, logger="urllib3.connectionpool") diff --git a/tests/cli/conftest.py b/tests/cli/conftest.py new file mode 100644 index 00000000000..961ad8ed203 --- /dev/null +++ b/tests/cli/conftest.py @@ -0,0 +1,11 @@ +# Copyright (C) 2012 Anaconda, Inc +# SPDX-License-Identifier: BSD-3-Clause +import logging + +import pytest + + +@pytest.fixture(autouse=True) +def urllib3_logger_error(caplog): + """Increase log level to error to prevent retries from polluting stderr.""" + caplog.set_level(logging.ERROR, logger="urllib3.connectionpool")