1212
1313import os .path as osp
1414
15- from guidata .qthelpers import qt_app_context
16-
1715from cdl .core .io .base import BaseIORegistry
1816from cdl .core .io .image import ImageIORegistry
1917from cdl .core .io .signal import SignalIORegistry
2018from cdl .env import execenv
2119from cdl .plugins import discover_plugins
22- from cdl .utils .qthelpers import CallbackWorker , qt_long_callback
2320from cdl .utils .strings import reduce_path
2421from cdl .utils .tests import CDLTemporaryDirectory , get_test_fnames
2522
@@ -36,15 +33,11 @@ def __testfunc(
3633 fnames = get_test_fnames (pattern , in_folder )
3734 objects = {}
3835 for fname in fnames :
39- worker = CallbackWorker (
40- lambda worker , fname : registry .read (fname , worker )[0 ], fname = fname
41- )
4236 label = f" Opening { reduce_path (fname )} "
4337 execenv .print (label + ": " , end = "" )
44- worker .SIG_PROGRESS_UPDATE .connect (lambda value : execenv .print (">" , end = "" ))
4538 try :
46- obj = qt_long_callback ( None , label , worker , fname . endswith ( ".sif" ))
47- execenv .print ("Canceled" if worker . was_canceled () else " OK" )
39+ obj = registry . read ( fname )[ 0 ]
40+ execenv .print ("OK" )
4841 objects [fname ] = obj
4942 except NotImplementedError :
5043 execenv .print ("Skipped (not implemented)" )
@@ -65,9 +58,8 @@ def __testfunc(
6558def test_io2 ():
6659 """I/O test"""
6760 execenv .print ("I/O unit test:" )
68- with qt_app_context ():
69- __testfunc ("Signals" , SignalIORegistry , "*.*" , "curve_formats" )
70- __testfunc ("Images" , ImageIORegistry , "*.*" , "image_formats" )
61+ __testfunc ("Signals" , SignalIORegistry , "*.*" , "curve_formats" )
62+ __testfunc ("Images" , ImageIORegistry , "*.*" , "image_formats" )
7163
7264
7365if __name__ == "__main__" :
0 commit comments