Skip to content

Fix spinedb_api ResourceWarnings in tests - #625

Merged
ptsavol merged 2 commits into
masterfrom
dispose_engines
Aug 18, 2026
Merged

ptsavol merged 2 commits into
masterfrom
dispose_engines

Conversation

@ptsavol

@ptsavol ptsavol commented Aug 11, 2026

Copy link
Copy Markdown
Member

Dispose lingering engines. Fixes a lot of ResourceWarnings.

Related to spine-tools/Spine-Toolbox#3336

Checklist before merging

  • Unit tests have been added/updated accordingly
  • Code has been formatted by black & isort
  • Unit tests pass

@ptsavol ptsavol self-assigned this Aug 11, 2026
@ptsavol
ptsavol requested a review from soininen August 11, 2026 14:06
@ptsavol

ptsavol commented Aug 11, 2026

Copy link
Copy Markdown
Member Author

Added a couple of engine.dispose()'s. The undisposed engines bleed ResourceWarnings into spine_items, toolbox, and engine tests.

@soininen soininen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a few questions about this, please see the comments.

Comment thread spinedb_api/db_mapping.py Outdated
Comment thread spinedb_api/db_mapping.py Outdated
@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 60.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.15%. Comparing base (303a427) to head (38c562c).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
spinedb_api/db_mapping.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #625   +/-   ##
=======================================
  Coverage   86.15%   86.15%           
=======================================
  Files          83       83           
  Lines       11475    11477    +2     
  Branches     1636     1636           
=======================================
+ Hits         9886     9888    +2     
  Misses       1238     1238           
  Partials      351      351           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ptsavol
ptsavol merged commit 5b487d9 into master Aug 18, 2026
16 of 17 checks passed
@ptsavol
ptsavol deleted the dispose_engines branch August 18, 2026 09:03
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.

2 participants