From baf8a54886c53eca7403474a458c4bf3e91cdc75 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Thu, 2 Dec 2021 09:19:29 -0800 Subject: [PATCH] TST: Fix local run on s3 tests --- pandas/tests/io/conftest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/conftest.py b/pandas/tests/io/conftest.py index ba9f9aa3f6a49..8c5bd6ec170e5 100644 --- a/pandas/tests/io/conftest.py +++ b/pandas/tests/io/conftest.py @@ -40,8 +40,13 @@ def feather_file(datapath): @pytest.fixture -def s3so(): - return {"client_kwargs": {"endpoint_url": "http://localhost:5000/"}} +def s3so(worker_id): + if os.environ.get("PANDAS_CI", "0") == "1": + url = "http://localhost:5000/" + else: + worker_id = "5" if worker_id == "master" else worker_id.lstrip("gw") + url = f"http://127.0.0.1:555{worker_id}/" + return {"client_kwargs": {"endpoint_url": url}} @pytest.fixture(scope="session")