Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI random failure in TestImageFileDialogInteraction.testClickOnBackToParentTool test #4134

Open
t20100 opened this issue Jun 13, 2024 · 1 comment
Milestone

Comments

@t20100
Copy link
Member

t20100 commented Jun 13, 2024

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 = <silx.gui.dialog.test.test_imagefiledialog.TestImageFileDialogInteraction testMethod=testClickOnBackToParentTool>

    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 = <silx.gui.dialog.test.test_imagefiledialog.TestImageFileDialogInteraction testMethod=testClickOnBackToParentTool>
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 t20100 added this to the Next release milestone Jun 13, 2024
@t20100
Copy link
Member Author

t20100 commented Sep 4, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant