Skip to content

Commit 6998b01

Browse files
committed
Remove unnecessary __tracebackhide__-decorating magic
1 parent 21954fc commit 6998b01

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

array_api_tests/pytest_helpers.py

+1-17
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import cmath
22
import math
3-
from functools import wraps
43
from inspect import getfullargspec
5-
from typing import Any, Callable, Dict, Optional, Sequence, Tuple, Union
4+
from typing import Any, Dict, Optional, Sequence, Tuple, Union
65

76
from . import _array_module as xp
87
from . import dtype_helpers as dh
@@ -484,18 +483,3 @@ def assert_array_elements(
484483
assert xp.all(
485484
out == expected
486485
), f"{out_repr} not as expected {f_func}\n{out_repr}={out!r}\n{expected=}"
487-
488-
489-
def _make_wrapped_assert_helper(assert_helper: Callable) -> Callable:
490-
@wraps(assert_helper)
491-
def wrapped_assert_helper(*args, **kwargs):
492-
__tracebackhide__ = True
493-
assert_helper(*args, **kwargs)
494-
495-
return wrapped_assert_helper
496-
497-
498-
for func_name in __all__:
499-
if func_name.startswith("assert"):
500-
assert_helper = globals()[func_name]
501-
globals()[func_name] = _make_wrapped_assert_helper(assert_helper)

0 commit comments

Comments
 (0)