def test_is_verbose(self): """Make sure is_verbose() does what it should :-).""" set_level(logging.INFO) assert not is_verbose() set_level(logging.DEBUG) assert is_verbose() set_level(logging.VERBOSE) assert is_verbose()
def enable_debug(): ''' Increase logging level to debug ''' while not coloredlogs.is_verbose(): coloredlogs.increase_verbosity()
def disable_debug(): ''' Decrease logging level below debug ''' while coloredlogs.is_verbose(): coloredlogs.decrease_verbosity()
def test_is_verbose(self): """Make sure is_verbose() does what it should :-).""" assert coloredlogs.root_handler.level == logging.INFO assert not coloredlogs.is_verbose() coloredlogs.set_level(logging.VERBOSE) assert coloredlogs.is_verbose()