Skip to content

Fix certbot tests after updating pytest to 9.0.2 - #10545

Merged
wgreenberg merged 7 commits into
mainfrom
test-pytest
Feb 2, 2026
Merged

wgreenberg merged 7 commits into
mainfrom
test-pytest

Conversation

@ohemorange

Copy link
Copy Markdown
Contributor

Fixes #10518.

tools/pinning/current/repin.sh is not run; only pytest version is updated. This is because pypinning had a bunch of syntax changes that seem simply but I believe should be in a separate PR, which I think should be done after this to collect all repin changes.

As discussed further in #10518, these issues were caused by pytest's internalization of pytest-subtest, which had several implementation changes.

To fix these, we simply no longer use subtest in the failing tests. The test in acme is now parametrized instead, and the tests in apache only ever had a single parameter.

To use parametrization in the acme test, I converted DNSTest from unittest to pytest style, which was pretty straightforward. The only note there is that while it would be nice to make ec_secp384r1_key a fixture, you can't use fixtures in parameters. You could use requests, but that seemed less clear and messier, because then you'd be checking the value of the parameter and only sometimes loading it. Could also make it a global variable, but that didn't really seem necessary, as it's only called twice. Happy to consider other options, not strongly tied to this one, just seemed nicest to me.

@ohemorange
ohemorange marked this pull request as ready for review January 23, 2026 02:04
@ohemorange
ohemorange requested a review from a team as a code owner January 23, 2026 02:04
@ohemorange
ohemorange requested review from wgreenberg and removed request for a team January 23, 2026 02:04

@wgreenberg wgreenberg left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

lgtm! fixtures look great

@wgreenberg
wgreenberg merged commit b362109 into main Feb 2, 2026
56 checks passed
@wgreenberg
wgreenberg deleted the test-pytest branch February 2, 2026 20:13
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.

[Task]: fix certbot tests after updating pytest

2 participants