Skip to content

test(interactive): fix Qt ownership and signal checks - #641

Merged
kmnhan merged 2 commits into
mainfrom
dev-fix-parameter-test-ownership
Nov 2, 2026
Merged

kmnhan merged 2 commits into
mainfrom
dev-fix-parameter-test-ownership

Conversation

@kmnhan

@kmnhan kmnhan commented Nov 2, 2026 •

Copy link
Copy Markdown
Owner

Fix two Qt test failures: a deleted parameter editor during teardown and a PySide6 smoke-test hang during signal cleanup.

The four standalone parameter-item tests now register item.layoutWidget with qtbot. This keeps the owning container alive through cleanup and prevents the editor from being deleted between the validity check and close().

The pocket and image edit tests now record their synchronous notifications and require exactly one emission. They retain all state and geometry assertions. This avoids disconnecting the pytest-qt callback during signal emission. A normal Linux diagnostic run reproduced the hang and captured this native path: signal disconnect, Shiboken feature lookup, Python garbage collection, widget/action destruction, and a blocked Qt mutex. The exact collected widget was not identified. This test-only change avoids the observed trigger.

Validation:

  • Parameter tests: 52 passed under each Qt binding. Four affected cases also passed under forced garbage collection on each binding.
  • Overlay tests: all 175 passed under PyQt6, and all 175 passed under Python 3.11 with PySide6 6.11.2.
  • Ruff formatting, lint, commit hooks, and the test partition check passed.
  • All 30 PR checks passed, including CI, CodeQL, Codecov, and Read the Docs. The previously failing Python 3.11/PySide6 job passed all 1,571 selected tests in the normal Linux CI run.

This is a follow-up to #640. No dependent data or documentation PRs.

Register the layout containers so garbage collection cannot delete their editors before pytest-qt closes them. Follow-up to #640.
@codecov

codecov Bot commented Nov 2, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.68%. Comparing base (c8b2105) to head (5272d03).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #641   +/-   ##
=======================================
  Coverage   92.68%   92.68%           
=======================================
  Files         310      310           
  Lines      119969   119969           
  Branches    20319    20319           
=======================================
  Hits       111190   111190           
- Misses       4962     4964    +2     
+ Partials     3817     3815    -2     

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

@kmnhan kmnhan changed the title test(interactive): retain parameter widget owners test(interactive): fix Qt ownership and signal checks Nov 2, 2026
@kmnhan
kmnhan marked this pull request as ready for review November 2, 2026 08:16
@kmnhan
kmnhan merged commit fe786ff into main Nov 2, 2026
30 checks passed
@kmnhan
kmnhan deleted the dev-fix-parameter-test-ownership branch November 2, 2026 08:16
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