Skip to content

Commit

Permalink
Bug fix for test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Aug 7, 2017
1 parent 4f63695 commit fef027b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions verboselogs/tests.py
Expand Up @@ -52,6 +52,9 @@ def test_spam_method(self):
def check_custom_level(self, name):
"""Check a custom log method."""
logger = verboselogs.VerboseLogger(random_string())
# Gotcha: If we use NOTSET (0) here the level will be inherited from
# the parent logger and our custom log level may be filtered out.
logger.setLevel(1)
logger._log = mock.MagicMock()
level = getattr(verboselogs, name.upper())
method = getattr(logger, name.lower())
Expand Down

0 comments on commit fef027b

Please sign in to comment.