diff --git a/nose/config.py b/nose/config.py index ccecf67..eb047a4 100644 --- a/nose/config.py +++ b/nose/config.py @@ -192,6 +192,7 @@ def __init__(self, **kw): self.debug = env.get('NOSE_DEBUG') self.debugLog = env.get('NOSE_DEBUG_LOG') self.logPropagate = bool(env.get('NOSE_LOG_PROPAGATE', False)) + self.logNoLogHandlers = bool(env.get('NOSE_NO_LOG_HANDLERS', False)) self.exclude = None self.getTestCaseNamesCompat = False self.includeExe = env.get('NOSE_INCLUDE_EXE', @@ -389,6 +390,9 @@ def configureLogging(self): if not found: logger.addHandler(handler) + if self.logNoLogHandlers: + logger.handlers = [] + # default level lvl = logging.WARNING if self.verbosity >= 5: