Skip to content

Commit

Permalink
fix: get tests passing on plucky
Browse files Browse the repository at this point in the history
  • Loading branch information
Perfect5th committed Nov 27, 2024
1 parent 1656a23 commit afa3bdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion landscape/lib/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,12 @@ def fake():
# because the call might cancel it!
call._data = self.call_later(seconds, fake)._data
try:
f(*args, **kwargs)
deferred = f(*args, **kwargs)

if hasattr(deferred, "result") and isinstance(deferred.result, Failure):
# Required for some failures to get GC'd properly flushed.
# Twisted did this in versions < 24.10, but now we have to.
deferred.result.cleanFailure()
except Exception:
if call.active:
self.cancel_call(call)
Expand Down

0 comments on commit afa3bdf

Please sign in to comment.