Skip to content

Commit

Permalink
Hide SubTests.test() from tracebacks (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
bswck authored Apr 22, 2024
1 parent 732064c commit c44862c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
CHANGELOG
=========

UNRELEASED
----------

* Hide the traceback inside the ``SubTests.test()`` method (`#131`_).

.. _#131: https://github.com/pytest-dev/pytest-subtests/pull/131

0.12.1 (2024-03-07)
-------------------

Expand Down
3 changes: 3 additions & 0 deletions src/pytest_subtests/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,9 @@ def test(
msg: str | None = None,
**kwargs: Any,
) -> Generator[None, None, None]:
# Hide from tracebacks.
__tracebackhide__ = True

start = time.time()
precise_start = time.perf_counter()
exc_info = None
Expand Down

0 comments on commit c44862c

Please sign in to comment.