File: utils.py

package info (click to toggle)
python-cryptography 38.0.4-3%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,968 kB
  • sloc: python: 51,022; ansic: 608; java: 319; makefile: 162
file content (19 lines) | stat: -rw-r--r-- 557 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from ..utils import load_wycheproof_tests


def wycheproof_tests(*paths):
    def wrapper(func):
        def run_wycheproof(
            backend, disable_rsa_checks, subtests, pytestconfig
        ):
            wycheproof_root = pytestconfig.getoption(
                "--wycheproof-root", skip=True
            )
            for path in paths:
                for test in load_wycheproof_tests(wycheproof_root, path):
                    with subtests.test():
                        func(backend, test)

        return run_wycheproof

    return wrapper