From 17e187f7f9bebffbc8ccefb9cc3e7aa71d1e0892 Mon Sep 17 00:00:00 2001 From: Martin Durant Date: Tue, 27 Jan 2026 10:33:23 -0500 Subject: [PATCH] Add failing test --- s3fs/tests/test_s3fs.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/s3fs/tests/test_s3fs.py b/s3fs/tests/test_s3fs.py index 7236b319..0c12ce7e 100644 --- a/s3fs/tests/test_s3fs.py +++ b/s3fs/tests/test_s3fs.py @@ -3085,3 +3085,14 @@ async def run_program(run): aiobotocore.httpsession.AIOHTTPSession asyncio.run(run_program(True)) asyncio.run(run_program(False)) + + +def test_rm_recursive_prfix(s3): + prefix = "logs/" # must end with "/" + + # Create empty "directory" in S3 + client = get_boto3_client() + client.put_object(Bucket=test_bucket_name, Key=prefix, Body=b"") + logs_path = f"s3://{test_bucket_name}/{prefix}" + s3.rm(logs_path, recursive=True) + assert not s3.isdir(logs_path)