Skip to content

tests: improve subtest cleanup - #2994

Merged
jku merged 1 commit into
theupdateframework:developfrom
Aryadeepta:improve-subtest-cleanup
Aug 25, 2026
Merged

tests: improve subtest cleanup#2994
jku merged 1 commit into
theupdateframework:developfrom
Aryadeepta:improve-subtest-cleanup

Conversation

@Aryadeepta

Copy link
Copy Markdown

Description:

Updates run_sub_tests_with_dataset to call teardown_subtest() in a
finally block when it is defined. This ensures per-subtest cleanup runs
even when a subtest fails.

Removes the now-redundant try/finally cleanup blocks from the affected
updater tests and adds regression coverage for cleanup after a failing
subtest.

Testing:

  • tox -e lint
  • tox -e py

Fixes #1719

Signed-off-by: aryadeepta <aryadeeptade@gmail.com>
@Aryadeepta
Aryadeepta requested a review from a team as a code owner August 23, 2026 16:01
@jku

jku commented Aug 25, 2026

Copy link
Copy Markdown
Member

test-with-sslib-main failure on CI is unrelated

@jku jku left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yeah looks about as good as we can get without switching to pytest.

Thanks for the patch.

@jku
jku merged commit 15362f7 into theupdateframework:develop Aug 25, 2026
16 of 17 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.

Improve subtests clean up

2 participants