European-XFEL / DAMNIT

Data And Metadata iNspection Interactive Thing
https://damnit.rtfd.io
BSD 3-Clause "New" or "Revised" License
6 stars 2 forks source link

Register widgets with qtbot in another test #342

Closed takluyver closed 2 months ago

takluyver commented 2 months ago

I hope this fixes the abort during tests seen in this CI run on PR #313:

Current thread 0x00007fe80e823b80 (most recent call first):
  Garbage-collecting
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/pathlib.py", line 574 in _parse_args
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/pathlib.py", line 594 in _from_parts
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/pathlib.py", line 960 in __new__
  File "/opt/hostedtoolcache/Python/3.10.15/x64/lib/python3.10/pathlib.py", line 1000 in home
  File "/home/runner/work/DAMNIT/DAMNIT/damnit/gui/main_window.py", line 67 in __init__
  File "/home/runner/work/DAMNIT/DAMNIT/tests/test_gui.py", line 51 in test_connect_to_kafka
  ...

I've also checked the rest of the tests - everywhere we create a MainWindow in the tests, we now register it with qtbot shortly afterwards.

takluyver commented 2 months ago

New failure, this one at least seems to be repeatable:

_________________________________ test_editor __________________________________
CALL ERROR: Exceptions caught in Qt event loop:
________________________________________________________________________________
Traceback (most recent call last):
  File "/home/runner/work/DAMNIT/DAMNIT/damnit/gui/main_window.py", line 849, in <lambda>
    QtCore.QTimer.singleShot(100, lambda: self._error_widget.setText(text))
RuntimeError: wrapped C/C++ object of type QsciScintilla has been deleted
________________________________________________________________________________
Traceback (most recent call last):
  File "/home/runner/work/DAMNIT/DAMNIT/damnit/gui/main_window.py", line 849, in <lambda>
    QtCore.QTimer.singleShot(100, lambda: self._error_widget.setText(text))
RuntimeError: wrapped C/C++ object of type QsciScintilla has been deleted
________________________________________________________________________________
----------------------------- Captured Qt messages -----------------------------
QtWarningMsg: libpng warning: iCCP: known incorrect sRGB profile
QtWarningMsg: libpng warning: iCCP: known incorrect sRGB profile
QtWarningMsg: QProcess: Destroyed while process ("/opt/hostedtoolcache/Python/3.10.15/x64/bin/python3") is still running.
QtWarningMsg: QProcess: Destroyed while process ("/opt/hostedtoolcache/Python/3.10.15/x64/bin/python3") is still running.
----------------------------- Captured stderr call -----------------------------
Exceptions caught in Qt event loop:
________________________________________________________________________________
Traceback (most recent call last):
  File "/home/runner/work/DAMNIT/DAMNIT/damnit/gui/main_window.py", line 849, in <lambda>
    QtCore.QTimer.singleShot(100, lambda: self._error_widget.setText(text))
RuntimeError: wrapped C/C++ object of type QsciScintilla has been deleted
________________________________________________________________________________
Exceptions caught in Qt event loop:
________________________________________________________________________________
Traceback (most recent call last):
  File "/home/runner/work/DAMNIT/DAMNIT/damnit/gui/main_window.py", line 849, in <lambda>
    QtCore.QTimer.singleShot(100, lambda: self._error_widget.setText(text))
RuntimeError: wrapped C/C++ object of type QsciScintilla has been deleted
________________________________________________________________________________
codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 75.30%. Comparing base (d3f0211) to head (c7dacaa). Report is 1 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #342 +/- ## ======================================= Coverage 75.30% 75.30% ======================================= Files 32 32 Lines 4965 4965 ======================================= Hits 3739 3739 Misses 1226 1226 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.