@@ -29,10 +29,7 @@ def test_image_background_selection() -> None:
2929 dlg = ImageBackgroundDialog (img )
3030 dlg .resize (640 , 480 )
3131 dlg .setObjectName (dlg .objectName () + "_00" ) # to avoid timestamp suffix
32- with execenv .context (delay = 200 ):
33- # For more details about the why of the delay, see the comment in
34- # datalab\tests\features\image\offset_correction_unit_test.py
35- exec_dialog (dlg )
32+ exec_dialog (dlg )
3633 execenv .print (f"background: { dlg .get_background ()} " )
3734 execenv .print (f"rect coords: { dlg .get_rect_coords ()} " )
3835 # Check background value:
@@ -46,16 +43,7 @@ def test_image_offset_correction_with_background_dialog() -> None:
4643 with qt_app_context ():
4744 i1 = create_noisygauss_image ()
4845 dlg = ImageBackgroundDialog (i1 )
49- with execenv .context (delay = 200 ):
50- # On Windows, the `QApplication.processEvents()` introduced with
51- # guidata V3.5.1 in `exec_dialog` is sufficient to force an update
52- # of the dialog. The delay is not required.
53- # On Linux, the delay is required to ensure that the dialog is displayed
54- # because the `QApplication.processEvents()` do not trigger the drawing
55- # event on the dialog as expected. So, the `RangeComputation2d` is not
56- # drawn, the background value is not computed, and `get_rect_coords()`
57- # returns `None` which causes the test to fail.
58- ok = exec_dialog (dlg )
46+ ok = exec_dialog (dlg )
5947 if ok :
6048 param = sigima .objects .ROI2DParam ()
6149 # pylint: disable=unbalanced-tuple-unpacking
0 commit comments