8000 TST: Refactor S3 tests by fangchenli · Pull Request #61703 · pandas-dev/pandas · GitHub
[go: up one dir, main page]

Skip to content

TST: Refactor S3 tests #61703

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 13 commits into from
Jun 30, 2025
Merged
Prev Previous commit
Next Next commit
yield instead of return
  • Loading branch information
fangchenli committed Jun 26, 2025
commit 518bd542364671d2ccb737c67e3c9112a4b0d103
15 changes: 8 additions & 7 deletions pandas/tests/io/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,14 @@ def moto_server(aws_credentials):
if is_ci_environment() and not (
is_platform_mac() or is_platform_arm() or is_platform_windows()
):
return "http://localhost:5000"
moto_server = pytest.importorskip("moto.server")
server = moto_server.ThreadedMotoServer(port=0)
server.start()
host, port = server.get_host_and_port()
yield f"http://{host}:{port}"
server.stop()
yield "http://localhost:5000"
else:
moto_server = pytest.importorskip("moto.server")
server = moto_server.ThreadedMotoServer(port=0)
server.start()
host, port = server.get_host_and_port()
yield f"http://{host}:{port}"
server.stop()


@pytest.fixture
Expand Down
Loading
0