The `rmdir` method can not delete buckets
DerPhysikeR opened this issue · 2 comments
DerPhysikeR commented
Hi and thank you for S3Path!
For a recent project I wanted to create temporary S3 buckets using S3Path.
Unfortunately, S3Path doesn't seem to be able to delete buckets, although it can create them.
def test_rmdir_can_remove_buckets(s3_mock):
s3 = boto3.resource('s3')
bucket = S3Path('/test-bucket/')
bucket.mkdir()
assert bucket.exists()
bucket.rmdir()
assert not bucket.exists()
This test fails because bucket.rmdir()
doesn't delete the bucket.
Also, no error is raised although the removal fails.
I don't believe this is intended behavior.
liormizr commented
The fix is merged
I'll update when we will create a new version
liormizr commented
Deployed in version 0.4.2