diff --git a/src/silx/gui/plot/test/test_plotwidget.py b/src/silx/gui/plot/test/test_plotwidget.py index 0e273c11ef..e6c1c74520 100755 --- a/src/silx/gui/plot/test/test_plotwidget.py +++ b/src/silx/gui/plot/test/test_plotwidget.py @@ -121,7 +121,7 @@ def testResizeWidget(self): """Test resizing the widget and receiving limitsChanged events""" self.plot.resize(200, 200) self.qapp.processEvents() - self.qWait(100) + self.qWait(500) xlim = self.plot.getXAxis().getLimits() ylim = self.plot.getYAxis().getLimits() @@ -133,19 +133,19 @@ def testResizeWidget(self): # Resize without aspect ratio self.plot.resize(200, 300) self.qapp.processEvents() - self.qWait(100) + self.qWait(500) self._checkLimits(expectedXLim=xlim, expectedYLim=ylim) self.assertEqual(listener.callCount(), 0) # Resize with aspect ratio self.plot.setKeepDataAspectRatio(True) self.qapp.processEvents() - self.qWait(1000) + self.qWait(500) listener.clear() # Clean-up received signal self.plot.resize(200, 200) self.qapp.processEvents() - self.qWait(100) + self.qWait(500) self.assertNotEqual(listener.callCount(), 0) def testAddRemoveItemSignals(self): diff --git a/src/silx/gui/plot/test/utils.py b/src/silx/gui/plot/test/utils.py index d48a4670f2..0055928bd0 100644 --- a/src/silx/gui/plot/test/utils.py +++ b/src/silx/gui/plot/test/utils.py @@ -1,6 +1,6 @@ # /*########################################################################## # -# Copyright (c) 2016-2021 European Synchrotron Radiation Facility +# Copyright (c) 2016-2024 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -59,6 +59,8 @@ def setUp(self): self.plot.show() self.plotAlive = True self.qWaitForWindowExposed(self.plot) + self.plot.raise_() + self.qapp.processEvents() TestCaseQt.mouseClick(self, self.plot, button=qt.Qt.LeftButton, pos=(0, 0)) def __onPlotDestroyed(self): diff --git a/src/silx/gui/plot3d/test/test_scenewidgetpicking.py b/src/silx/gui/plot3d/test/test_scenewidgetpicking.py index 1c32899286..b2d23897a8 100644 --- a/src/silx/gui/plot3d/test/test_scenewidgetpicking.py +++ b/src/silx/gui/plot3d/test/test_scenewidgetpicking.py @@ -1,6 +1,6 @@ # /*########################################################################## # -# Copyright (c) 2018-2019 European Synchrotron Radiation Facility +# Copyright (c) 2018-2024 European Synchrotron Radiation Facility # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -45,9 +45,10 @@ class TestSceneWidgetPicking(TestCaseQt, ParametricTestCase): def setUp(self): super(TestSceneWidgetPicking, self).setUp() self.widget = SceneWidget() - self.widget.resize(300, 300) self.widget.show() - # self.qWaitForWindowExposed(self.widget) + self.widget.raise_() + self.qWaitForWindowExposed(self.widget) + self.qapp.processEvents() def tearDown(self): self.qapp.processEvents()