Skip to content

Commit

Permalink
Move urllib3_logger_error to conftest.py (conda#13305)
Browse files Browse the repository at this point in the history
  • Loading branch information
kenodegard authored Nov 9, 2023
1 parent 6233770 commit a91903b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 0 additions & 9 deletions tests/cli/__init__.py
Original file line number Diff line number Diff line change
@@ -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")
11 changes: 11 additions & 0 deletions tests/cli/conftest.py
Original file line number Diff line number Diff line change
@@ -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")

0 comments on commit a91903b

Please sign in to comment.