Bug #684071 “monkey patching 'debug' breaks twisted.internet.bas...” : Bugs : testtools (original) (raw)

monkey patching 'debug' breaks twisted.internet.base.DelayedCall

This bug affects 1 person

Affects Status Importance Assigned to Milestone
Twisted New Undecided Unassigned
testtools Triaged Medium Unassigned

Bug Description

affects testtools

twisted.internet.base.DelayedCall has different behaviour depending
whether or not debug was specified to its constructor. It will set
self.creator to traceback.format_stack().

Later on, in its __str__ it uses the debug attribute to determine
whether or not to add a traceback to the output - a traceback which is
not available in case testtools monkey patched debug to be true.

Btw, apart from this issue the debug code was really useful in tracking
down a bug in the builddmanager yesterday. Thanks for writing it.

Cheers,

jelmer