Skip to content

Backport PR #38480 on branch 1.2.x (CI: Supress moto server logs in tests) #38501

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions pandas/tests/io/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ def s3_base(worker_id):
pytest.importorskip("s3fs")
pytest.importorskip("boto3")
requests = pytest.importorskip("requests")
# GH 38090: Suppress http logs in tests by moto_server
logging.getLogger("werkzeug").disabled = True
logging.getLogger("requests").disabled = True

with tm.ensure_safe_environment_variables():
# temporary workaround as moto fails for botocore >= 1.11 otherwise,
Expand All @@ -71,7 +70,9 @@ def s3_base(worker_id):

# pipe to null to avoid logging in terminal
proc = subprocess.Popen(
shlex.split(f"moto_server s3 -p {endpoint_port}"), stdout=subprocess.DEVNULL
shlex.split(f"moto_server s3 -p {endpoint_port}"),
stdout=subprocess.DEVNULL,
stderr=subprocess.DEVNULL,
)

timeout = 5
Expand Down