From 426f62dbca58601112267ab5d2754816db4ced18 Mon Sep 17 00:00:00 2001 From: Ethan Ho <53266718+ethho@users.noreply.github.com> Date: Wed, 18 Sep 2024 18:33:52 -0500 Subject: [PATCH] Skip minio client fixture teardown by default --- tests/conftest.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index ef75d8d4..b415623a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -437,7 +437,7 @@ def minio_client_bare(s3_creds): @pytest.fixture(scope="session") -def minio_client(s3_creds, minio_client_bare): +def minio_client(s3_creds, minio_client_bare, teardown=False): """Initialize a MinIO client and create buckets for testing session.""" # Setup MinIO bucket aws_region = "us-east-1" @@ -447,6 +447,8 @@ def minio_client(s3_creds, minio_client_bare): if e.code != "BucketAlreadyOwnedByYou": raise e + if not teardown: + return minio_client_bare yield minio_client_bare # Teardown S3