Repository navigation
Fix certbot tests after updating pytest to 9.0.2 - #10545
Merged
Merged
Conversation
…ad of using subtest
wgreenberg
approved these changes
Feb 2, 2026
wgreenberg
left a comment
Collaborator
There was a problem hiding this comment.
lgtm! fixtures look great
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10518.
tools/pinning/current/repin.shis not run; only pytest version is updated. This is becausepypinninghad 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
DNSTestfrom unittest to pytest style, which was pretty straightforward. The only note there is that while it would be nice to makeec_secp384r1_keya 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.