Add a local variable for the logger name
This commit is contained in:
parent
58a8a7e992
commit
6fb83aacae
@ -28,10 +28,11 @@ from qutebrowser.utils import debug
|
||||
|
||||
def test_log_time(caplog):
|
||||
"""Test if log_time logs properly."""
|
||||
logger = logging.getLogger('qt-tests')
|
||||
|
||||
with caplog.atLevel(logging.DEBUG, logger='qt-tests'):
|
||||
with debug.log_time(logger, action='foobar'):
|
||||
logger_name = 'qt-tests'
|
||||
|
||||
with caplog.atLevel(logging.DEBUG, logger=logger_name):
|
||||
with debug.log_time(logging.getLogger(), action='foobar'):
|
||||
time.sleep(0.1)
|
||||
|
||||
records = caplog.records()
|
||||
|
Loading…
Reference in New Issue
Block a user