silx-kit / silx

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

silx.gui.plot.PlotWidget: Fixed support of PySide6 #4136

Open t20100 opened 3 weeks ago

t20100 commented 3 weeks ago

Checklist:


This PR adds an accepted exception type to those that can happen during PlotWidget.hideEvent with PySide6. This aims at fixing the CI on Windows with PySide6:

__________________ TestPixelIntensitiesHisto.testShowAndHide __________________
self = <silx.gui.plot.test.testPixelIntensityHistoAction.TestPixelIntensitiesHisto testMethod=testShowAndHide>
    def tearDown(self):
        del self.plotImage
>       super(TestPixelIntensitiesHisto, self).tearDown()
venv_test\Lib\site-packages\silx\gui\plot\test\testPixelIntensityHistoAction.py:50: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <silx.gui.plot.test.testPixelIntensityHistoAction.TestPixelIntensitiesHisto testMethod=testShowAndHide>
    def tearDown(self):
        self.qapp.processEvents()

        if len(self.__class__._exceptions) > 0:
            messages = "\n".join(self.__class__._exceptions)
>           raise AssertionError("Exception occured in Qt thread:\n" + messages)
E           AssertionError: Exception occured in Qt thread:
E           Traceback (most recent call last):
E           AttributeError: Slot 'FitAction::' not found.
venv_test\Lib\site-packages\silx\gui\utils\testutils.py:193: AssertionError
------------------------------ Captured log call ------------------------------
ERROR    silx.gui.plot.PlotWidget:PlotWidget.py:835 Exception occured: The SignalInstance object was already deleted