master
/ miniconda3 / pkgs / cryptography-39.0.1-py311h9ce1e76_2 / info / test / tests / wycheproof / utils.py

utils.py @a663dc1

41a0142
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
from ..utils import load_wycheproof_tests


def wycheproof_tests(*paths):
    def wrapper(func):
        def run_wycheproof(backend, 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