Merge branch 'economic-test-suite'
Marco Ricci

Marco Ricci commited on 2026-08-24 06:46:44
Zeige 0 geänderte Dateien mit 0 Einfügungen und 0 Löschungen.


This pull request fixes some issues with the test suite setup, which
ultimately speed up running the suite almost by a factor of two.

 1. We repair the PYTHONPATH setting during invocation, and document why
    we need those entries in the configuration: to support the use of
    multiprocessing ("spawn" method) in the heavy-duty configuration
    mutex test.

 2. We set up mocking/monkeypatching to block loading of `cryptography`,
    so we can test the fallback logic in `derivepassphrase export vault`
    without needing a separate virtualenv/hatch environment, effectively
    cutting our test matrix in half.  This is where the two-fold speedup
    comes from.

    The `--version` test for `derivepassphrase export vault` turned out
    to also need accommodation: parametrization, and the mocking of
    `importlib.metadata.version`.  We left these in a separate commit
    because they were discovered after-the-fact, and because the changes
    to that test are somewhat less straightforward than those for the
    other "no cryptography available" tests.

 3. We test on CPython 3.15, which is at release candidate 1 now.

 4. We fix installation issues with hypothesis on PyPy 3.10, and
    presumably on PyPy 3.9 as well, because they nominally require
    a Rust toolchain, but the Rust toolchain cannot install the library
    on PyPy 3.10 or lower.

* economic-test-suite:
  Repair the --version output test for derivepassphrase export vault
  Officially support and test on Python 3.15
  Fix hypothesis dependency on PyPy 3.9 and PyPy 3.10
  Always test the "no cryptography support" scenario, shrinking the test matrix
  Set the Python path correctly during pytest invocation, round two