mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-31 16:36:20 +00:00
test_magic_folder: turn off debugging when done
This commit is contained in:
parent
d6cbe44786
commit
ae5637dc9c
@ -86,10 +86,10 @@ class MagicFolder(service.MultiService):
|
|||||||
self.set_public_status)
|
self.set_public_status)
|
||||||
self._public_status = (False, ['Magic folder has not yet started'])
|
self._public_status = (False, ['Magic folder has not yet started'])
|
||||||
|
|
||||||
def enable_debug_log(self):
|
def enable_debug_log(self, enabled=True):
|
||||||
print "enable debug log"
|
print "enable debug log"
|
||||||
self.uploader.enable_debug_log()
|
self.uploader.enable_debug_log(enabled)
|
||||||
self.downloader.enable_debug_log()
|
self.downloader.enable_debug_log(enabled)
|
||||||
|
|
||||||
def get_public_status(self):
|
def get_public_status(self):
|
||||||
"""
|
"""
|
||||||
@ -172,9 +172,9 @@ class QueueMixin(HookMixin):
|
|||||||
# far)
|
# far)
|
||||||
self._processing = defer.succeed(None)
|
self._processing = defer.succeed(None)
|
||||||
|
|
||||||
def enable_debug_log(self):
|
def enable_debug_log(self, enabled=True):
|
||||||
print "queue mixin enable debug logging"
|
print "queue mixin enable debug logging"
|
||||||
self._debug_log = True
|
self._debug_log = enabled
|
||||||
|
|
||||||
def get_status(self):
|
def get_status(self):
|
||||||
"""
|
"""
|
||||||
|
@ -1032,6 +1032,11 @@ class SingleMagicFolderTestMixin(MagicFolderCLITestMixin, ShouldFailMixin, Reall
|
|||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
d = super(SingleMagicFolderTestMixin, self).tearDown()
|
d = super(SingleMagicFolderTestMixin, self).tearDown()
|
||||||
|
def _disable_debugging(res):
|
||||||
|
if self.magicfolder:
|
||||||
|
self.magicfolder.enable_debug_log(False)
|
||||||
|
return res
|
||||||
|
d.addBoth(_disable_debugging)
|
||||||
d.addCallback(self.cleanup)
|
d.addCallback(self.cleanup)
|
||||||
return d
|
return d
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user