Skip to content

silx.gui.plot.tools.tests.test_profile: Replace subtests by parametrization - #4753

Merged
loichuder merged 1 commit into
mainfrom
replace-subtest-with-parametrize
Oct 23, 2026
Merged

loichuder merged 1 commit into
mainfrom
replace-subtest-with-parametrize

Conversation

@loichuder

Copy link
Copy Markdown
Member

PR summary

pytest.subtests are only available in pytest 9.0 and this raises issues for the debian packaging.

In this PR, the subtests are replaced by simple parametrization.

AI Disclosure

  • AI tool Claude used for the replacement

],
)
def testImageActions(self, imagePlot, roiClass, qapp_utils):
self.genericRoiTest(imagePlot, roiClass, qapp_utils)

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.

maybe bake the 3 tests wrapping genericRoiTest into one.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That doesn't seem easy unless I am missing something 😅

What did you have in mind?

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.

Sorry, I read too fast and missed the fact that the first fixture is not always the same, so it's fine as it is.

request.getfixturevalue could be used to do so, but not worth the complexity IMO.

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.

Sorry, I read too fast and missed the fact that the first fixture is not always the same, so it's fine as it is.

request.getfixturevalue could be used to do so, but not worth the complexity IMO.

@loichuder
loichuder merged commit 1405f30 into main Oct 23, 2026
4 checks passed
@loichuder
loichuder deleted the replace-subtest-with-parametrize branch October 23, 2026 11:56
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