def feedr(test_options=None): """Main entry point for script.""" version = ver_check() options = test_options or docopt(__doc__, version=version) _set_global_verbosity_level(options.get('--verbose')) lgr.debug(options) feeder_run(options)
def test_set_global_verbosity_level(self, capture): lgr = logger.init(base_level=logging.INFO) fd._set_global_verbosity_level(is_verbose_output=False) lgr.debug('TEST_LOGGER_OUTPUT') capture.check() lgr.info('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) fd._set_global_verbosity_level(is_verbose_output=True) lgr.debug('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT'), ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT'))
def test_set_global_verbosity_level(self, capture): lgr = logger.init(base_level=logging.INFO) fd._set_global_verbosity_level(is_verbose_output=False) lgr.debug('TEST_LOGGER_OUTPUT') capture.check() lgr.info('TEST_LOGGER_OUTPUT') capture.check(('user', 'INFO', 'TEST_LOGGER_OUTPUT')) fd._set_global_verbosity_level(is_verbose_output=True) lgr.debug('TEST_LOGGER_OUTPUT') capture.check( ('user', 'INFO', 'TEST_LOGGER_OUTPUT'), ('user', 'DEBUG', 'TEST_LOGGER_OUTPUT'))