File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 11import json
22import os
33import platform
4+ import warnings
45
5- from mobile_sam .predictor import SamPredictor as MobileSamPredictor
6+ # Avoid import warnigns from mobile_sam
7+ with warnings .catch_warnings ():
8+ warnings .simplefilter ("ignore" )
9+ from mobile_sam .predictor import SamPredictor as MobileSamPredictor
610from segment_anything .predictor import SamPredictor
711import numpy as np
812import pytest
@@ -33,8 +37,11 @@ def test_embedding_widget(make_napari_viewer, tmp_path):
3337 my_widget .embeddings_save_path = tmp_path
3438
3539 # Run image embedding widget.
36- worker = my_widget (skip_validate = True )
37- worker .await_workers () # blocks until thread worker is finished the embedding
40+ my_widget (skip_validate = True )
41+
42+ # Previous version when we used a thread-worker
43+ # worker = my_widget(skip_validate=True)
44+ # worker.await_workers() # blocks until thread worker is finished the embedding
3845
3946 # Check in-memory state for predictor and embeddings.
4047 assert isinstance (AnnotatorState ().predictor , (SamPredictor , MobileSamPredictor ))
You can’t perform that action at this time.
0 commit comments