mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Add some docstrings
This commit is contained in:
parent
d9f3f322c5
commit
aeb69c0f8c
@ -27,6 +27,10 @@ logging.getLogger().setLevel(NEVER)
|
|||||||
|
|
||||||
|
|
||||||
class TestCase(unittest.TestCase):
|
class TestCase(unittest.TestCase):
|
||||||
|
"""A subclass of twisted.trial's TestCase which looks for 'loglevel'
|
||||||
|
attributes on both itself and its individual test methods, to override the
|
||||||
|
root logger's logging level while that test (case|method) runs."""
|
||||||
|
|
||||||
def __init__(self, methodName, *args, **kwargs):
|
def __init__(self, methodName, *args, **kwargs):
|
||||||
super(TestCase, self).__init__(methodName, *args, **kwargs)
|
super(TestCase, self).__init__(methodName, *args, **kwargs)
|
||||||
|
|
||||||
@ -56,5 +60,7 @@ class TestCase(unittest.TestCase):
|
|||||||
|
|
||||||
|
|
||||||
def DEBUG(target):
|
def DEBUG(target):
|
||||||
|
"""A decorator to set the .loglevel attribute to logging.DEBUG.
|
||||||
|
Can apply to either a TestCase or an individual test method."""
|
||||||
target.loglevel = logging.DEBUG
|
target.loglevel = logging.DEBUG
|
||||||
return target
|
return target
|
||||||
|
Loading…
Reference in New Issue
Block a user