silx-kit / silx

silx toolkit
http://www.silx.org/doc/silx/latest/
MIT License
129 stars 73 forks source link

CI random failure in TestImageFileDialogInteraction.testClickOnBackToParentTool test #4134

Open t20100 opened 3 months ago

t20100 commented 3 months ago

There is a random test failure in TestImageFileDialogInteraction.testClickOnBackToParentTool:

Occured in Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072591

and also in the project CI:

CI logs ``` =================================== FAILURES =================================== __________ TestImageFileDialogInteraction.testClickOnBackToParentTool __________ self = def testClickOnBackToParentTool(self): dialog = self.createDialog() dialog.show() self.qWaitForWindowExposed(dialog) url = testutils.findChildren(dialog, qt.QLineEdit, name="url")[0] action = testutils.findChildren(dialog, qt.QAction, name="toParentAction")[0] toParentButton = testutils.getQToolButtonFromAction(action) filename = _tmpDirectory + "/data/data.h5" # init state path = silx.io.url.DataUrl(file_path=filename, data_path="/group/image").path() dialog.selectUrl(path) self.qWaitForPendingActions(dialog) path = silx.io.url.DataUrl( scheme="silx", file_path=filename, data_path="/group/image" ).path() self.assertSamePath(url.text(), path) # test self.mouseClick(toParentButton, qt.Qt.LeftButton) self.qWaitForPendingActions(dialog) path = silx.io.url.DataUrl( scheme="silx", file_path=filename, data_path="/" ).path() self.assertSamePath(url.text(), path) self.mouseClick(toParentButton, qt.Qt.LeftButton) self.qWaitForPendingActions(dialog) self.assertSamePath(url.text(), _tmpDirectory + "/data") self.mouseClick(toParentButton, qt.Qt.LeftButton) self.qWaitForPendingActions(dialog) > self.assertSamePath(url.text(), _tmpDirectory) /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/silx/gui/dialog/test/test_imagefiledialog.py:285: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ self = path1 = '/var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh/data' path2 = '/var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh' def assertSamePath(self, path1, path2): path1_ = os.path.normcase(path1) path2_ = os.path.normcase(path2) if path1_ != path2_: # Use the unittest API to log and display error > self.assertEqual(path1, path2) E AssertionError: '/var[37 chars]000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh/data' != '/var[37 chars]000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh' E - /var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh/data E ? ----- E + /var/folders/dm/88b38gj92jj53dgxdsm12qf00000gn/T/silx.gui.dialog.test.test_imagefiledialogvf01x4dh /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/silx/gui/dialog/test/test_imagefiledialog.py:136: AssertionError ```
t20100 commented 4 weeks ago

Debian issue was fixed with silx 2.1.0: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1072591#17