Example #1
0
File: cli.py Project: nir0s/repex
def jocker(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'))
    jocker_lgr.debug(options)
    jocker_run(options)
Example #2
0
    def test_set_global_verbosity_level(self, capture):
        lgr = init(base_level=logging.INFO)

        _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"))

        _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"))