Skip to content

Commit

Permalink
Update src/twisted/test/test_defer.py
Browse files Browse the repository at this point in the history
Co-authored-by: Adi Roiban <adiroiban@gmail.com>
  • Loading branch information
graingert and adiroiban committed Oct 16, 2023
1 parent e990344 commit 2df4c76
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/twisted/test/test_defer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1714,7 +1714,15 @@ def test_inlineCallbacksTracebacks(self) -> None:
except BaseException:
d.errback()

def ic(d: object) -> Generator[Any, Any, None]:
def ic(d: object) -> Generator[Any, Any, None]: # pragma: no cover
"""
This is never called.
It is only used as the decorated function.
The resulting function is never called in this test.
This is used to make sure that if we wrap
an already failed deferred, inlineCallbacks
will not add any extra traceback frames.
"""
yield d

defer.inlineCallbacks(ic)
Expand Down

0 comments on commit 2df4c76

Please sign in to comment.