create information retrieval challenge a (#3770)

Co-authored-by: Richard Beales <rich@richbeales.net>
This commit is contained in:
merwanehamadi
2023-05-04 09:44:10 -07:00
committed by GitHub
parent cb97f5c101
commit b0163230a9
4 changed files with 878 additions and 0 deletions

View File

@@ -1,4 +1,5 @@
import random
from functools import wraps
from typing import Optional
import pytest
@@ -42,3 +43,21 @@ def generate_noise(noise_size) -> str:
k=noise_size,
)
)
def run_multiple_times(times):
"""
Decorator that runs a test function multiple times.
:param times: The number of times the test function should be executed.
"""
def decorator(test_func):
@wraps(test_func)
def wrapper(*args, **kwargs):
for _ in range(times):
test_func(*args, **kwargs)
return wrapper
return decorator