From 83a359586281aeae024ea160ae7fe7c206a14823 Mon Sep 17 00:00:00 2001 From: Anwai Archit Date: Tue, 19 Nov 2024 10:45:44 +0100 Subject: [PATCH] Reduce autoseg cli tests to one image --- test/test_sam_annotator/test_cli.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/test/test_sam_annotator/test_cli.py b/test/test_sam_annotator/test_cli.py index 9e5b63a5..317a179f 100644 --- a/test/test_sam_annotator/test_cli.py +++ b/test/test_sam_annotator/test_cli.py @@ -42,12 +42,10 @@ def test_image_series_annotator(self): def test_precompute_embeddings(self): self._test_command("micro_sam.precompute_embeddings") - # Create 2 images as testdata. - n_images = 2 - for i in range(n_images): - im_path = os.path.join(self.tmp_folder, f"image-{i}.tif") - image_data = binary_blobs(512).astype("uint8") * 255 - imageio.imwrite(im_path, image_data) + # Create 1 image as testdata. + im_path = os.path.join(self.tmp_folder, "image.tif") + image_data = binary_blobs(512).astype("uint8") * 255 + imageio.imwrite(im_path, image_data) # Test precomputation with a single image. emb_path1 = os.path.join(self.tmp_folder, "embedddings1.zarr")