Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_old_config_fails() -> None:
"""Ensure the config for fauxmo < v0.4.0 fails with SystemExit."""
with pytest.raises(SystemExit):
fauxmo.main(config_path_str="tests/old-config-sample.json")
help="increase verbosity (may repeat up to -vvv)",
action="count",
default=0,
)
parser.add_argument("-c", "--config", help="specify alternate config file")
parser.add_argument(
"-V", "--version", action="version", version=__version__
)
args = parser.parse_args(arguments)
# args.verbose defaults to 0
# 40 - 10 * 0 = 40 == logging.ERROR
verbosity = max(40 - 10 * args.verbose, 10)
logger.setLevel(verbosity)
main(config_path_str=args.config, verbosity=verbosity)