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

[FIX] widgettoolbox: Fix WidgetToolBox tests with Python 3.12 #283

Merged

Conversation

ales-erjavec
Copy link
Collaborator

Issue

Running unittests on Python 3.12 aborts with

...
test_filter (orangecanvas.application.tests.test_widgettoolbox.TestWidgetToolBox.test_filter) ... ok
Traceback (most recent call last):
  File "/home/ales/devel/orange-canvas-core/orangecanvas/application/widgettoolbox.py", line 161, in actionEvent
    button = self.buttonForAction(event.action())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/ales/devel/orange-canvas-core/orangecanvas/gui/toolgrid.py", line 345, in buttonForAction
    index = actions.index(action)
            ^^^^^^^^^^^^^^^^^^^^^
ValueError: <PyQt6.QtGui.QAction object at 0x7fd2b44b48a0> is not in list
Fatal Python error: Aborted

Changes

Handle model reset and use model reset in test tearDown to avoid errors in tests.

... and use model reset in test tearDown to avoid errors in tests
@codecov-commenter
Copy link

codecov-commenter commented Oct 10, 2023

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (7f535af) 75.47% compared to head (1ecdf6d) 75.67%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   75.47%   75.67%   +0.20%     
==========================================
  Files          99       99              
  Lines       21033    21043      +10     
==========================================
+ Hits        15875    15925      +50     
+ Misses       5158     5118      -40     
Files Coverage Δ
orangecanvas/application/widgettoolbox.py 74.44% <91.66%> (+0.51%) ⬆️

... and 5 files with indirect coverage changes

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

@janezd janezd merged commit 636c6b3 into biolab:master Oct 13, 2023
23 of 24 checks passed
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.

None yet

3 participants