diff --git a/tests/assertions.py b/tests/assertions.py index 87b9b09ed..549420790 100644 --- a/tests/assertions.py +++ b/tests/assertions.py @@ -24,5 +24,6 @@ def assert_unchanged( def assert_one(seq: abc.Sequence[T]) -> T: """assert whether a sequence contains only one element and return it""" + __tracebackhide__ = True assert (l := len(seq)) == 1, f"Expected one element in sequence, found {l} (sequence: {seq!r})" return seq[0]