From 307ba15b9267e3f21af9a1e40a4ad991405190ff Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Mon, 14 Dec 2020 15:53:04 -0800 Subject: [PATCH 1/2] CI: Supress moto server logs in tests --- pandas/tests/io/conftest.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index bcc666a88e3be..ff68ead271f09 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -1,4 +1,3 @@ -import logging import os import shlex import subprocess @@ -50,8 +49,6 @@ 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 with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise, @@ -71,7 +68,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 From 733a68f17ac45966b68201e27e17680141cde943 Mon Sep 17 00:00:00 2001 From: Matt Roeschke Date: Mon, 14 Dec 2020 22:30:26 -0800 Subject: [PATCH 2/2] Try disabling get requests logs --- pandas/tests/io/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index ff68ead271f09..5d4705dbe7d77 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -1,3 +1,4 @@ +import logging import os import shlex import subprocess @@ -49,6 +50,7 @@ def s3_base(worker_id): pytest.importorskip("s3fs") pytest.importorskip("boto3") requests = pytest.importorskip("requests") + logging.getLogger("requests").disabled = True with tm.ensure_safe_environment_variables(): # temporary workaround as moto fails for botocore >= 1.11 otherwise,