diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py index d7ca1e72813446f..8e13ab4b9bc794f 100644 --- a/Lib/test/support/__init__.py +++ b/Lib/test/support/__init__.py @@ -1280,6 +1280,7 @@ def bigmemtest(size, memuse, dry_run=True): test doesn't support dummy runs when -M is not specified. """ def decorator(f): + @functools.wraps(f) def wrapper(self): size = wrapper.size memuse = wrapper.memuse @@ -1332,6 +1333,7 @@ def internal(*args, **kwargs): def bigaddrspacetest(f): """Decorator for tests that fill the address space.""" + @functools.wraps(f) def wrapper(self): if max_memuse < MAX_Py_ssize_t: if MAX_Py_ssize_t >= 2**63 - 1 and max_memuse >= 2**31: @@ -1437,6 +1439,7 @@ def no_rerun(reason): def deco(func): assert not isinstance(func, type), func _has_run = False + @functools.wraps(func) def wrapper(self): nonlocal _has_run if _has_run: