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

Register widgets with qtbot in another test #342

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

takluyver
Copy link
Member

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
Copy link
Member Author

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
________________________________________________________________________________

Copy link

codecov bot commented Sep 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

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

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@takluyver takluyver merged commit d511cd2 into master Sep 26, 2024
6 checks passed
@takluyver takluyver deleted the fix/test-conn-kafka-qtbot branch September 26, 2024 16:42
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

Successfully merging this pull request may close these issues.

1 participant