Skip to content

Commit

Permalink
test if container can be closed twice without error
Browse files Browse the repository at this point in the history
  • Loading branch information
agoscinski committed Feb 20, 2025
1 parent 87b9c01 commit dfdc21c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_container.py
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,15 @@ def test_sizes(
assert size_info["total_size_loose"] == 0


def test_close_twice(temp_dir):
"""Tests if the container can be closed twice without raising an error."""
temp_container = Container(temp_dir)
try:
temp_container.close()
finally:
temp_container.close()


def test_get_objects_stream_closes(temp_dir, generate_random_data):
"""Test that get_objects_stream_and_meta closes intermediate streams.
Expand Down

0 comments on commit dfdc21c

Please sign in to comment.