/usr/lib/python2.7/dist-packages/testtools/twistedsupport/_deferreddebug.py is in python-testtools 2.3.0-3ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | # Copyright (c) testtools developers. See LICENSE for details.
#
# TODO: Move this to testtools.twistedsupport. See testing-cabal/testtools#202.
from fixtures import Fixture, MonkeyPatch
class DebugTwisted(Fixture):
"""Set debug options for Twisted."""
def __init__(self, debug=True):
super(DebugTwisted, self).__init__()
self._debug_setting = debug
def _setUp(self):
self.useFixture(
MonkeyPatch('twisted.internet.defer.Deferred.debug',
self._debug_setting))
self.useFixture(
MonkeyPatch('twisted.internet.base.DelayedCall.debug',
self._debug_setting))
|