Closed hartytp closed 1 year ago
# parser = argparse.ArgumentParser() # parser.add_argument( # "-v", "--verbose", default=0, action="count", help="increase logging level" # ) # parser.add_argument( # "-q", "--quiet", default=0, action="count", help="decrease logging level" # ) # args, _ = parser.parse_known_args() # logging.getLogger().setLevel(logging.DEBUG) # logger.setLevel(logging.WARNING + args.quiet * 10 - args.verbose * 10) # handler = logging.StreamHandler(sys.stdout) # handler.setLevel(logging.DEBUG) # logger.addHandler(handler)
semi-related This is probably fine as it is. I just thought I might point out that pytest has some integration with pythons warnings system: https://docs.pytest.org/en/7.1.x/how-to/capture-warnings.html