Skip to content

Commit

Permalink
close datasets
Browse files Browse the repository at this point in the history
  • Loading branch information
henrypinkard committed Jun 14, 2024
1 parent fc76a86 commit c4f325d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pycromanager/test/test_callback_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def hook_fn(image, metadata):
dataset = acq.get_dataset()

assert len(dataset.get_image_coordinates_list()) == 0
dataset.close()


def test_img_process_fn_image_saved_fn_consistency(launch_mm_headless, setup_data_folder):
Expand All @@ -61,6 +62,7 @@ def saved(_axis, _dataset):

assert(processed.num_processed == 200)
assert(saved.num_saved == 200)
acq.get_dataset().close()

def test_event_serialize_and_deserialize(launch_mm_headless):
"""
Expand Down Expand Up @@ -94,5 +96,6 @@ def hook_fn(event):
events_copy = [e for e in events]
for test_event in events:
acq.acquire(test_event)
acq.get_dataset().close()


2 changes: 1 addition & 1 deletion pycromanager/test/test_notifications.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,5 @@ def test_async_images_read_sequence(launch_mm_headless, setup_data_folder):
# Make sure the returned images were the correct ones
on_disk = [acq.get_dataset().read_image(time=t) for t in [7, 8, 9]]
assert all([np.all(on_disk[i] == images[i]) for i in range(3)])
acq.get_dataset().close()
# acq.get_dataset().close()

0 comments on commit c4f325d

Please sign in to comment.