certbot/certbot-apache/src/certbot_apache
ohemorange b362109bf6
Fix certbot tests after updating pytest to 9.0.2 (#10545)
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](https://github.com/pytest-dev/pytest/issues/349). 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.
2026-02-02 12:13:24 -08:00
..
_internal Fix certbot tests after updating pytest to 9.0.2 (#10545) 2026-02-02 12:13:24 -08:00
__init__.py Add --use-pep517 flag to pip to silence warning in tools/venv.py, and switch codebase to src-layout (#10249) 2025-04-11 19:30:33 +00:00
py.typed Add --use-pep517 flag to pip to silence warning in tools/venv.py, and switch codebase to src-layout (#10249) 2025-04-11 19:30:33 +00:00