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_no_parameter_returns_default_options(self):
opt = options.normalize_options()
assert opt is not options.DEFAULT_OPTIONS
for k, v in options.DEFAULT_OPTIONS.items():
assert k in opt
assert opt[k] == v
choices=["orig", "auto", "jpeg", "jpg", "png"],
default=DEFAULT_OPTIONS["output_format"]
)
parser.add_argument(
"--%sresize" % prefix,
help="resize the image",
metavar="{orig,,x}",
type=_type_resize,
default=DEFAULT_OPTIONS["resize"]
)
parser.add_argument(
"--%sjpeg-quality" % prefix,
help="JPEG quality if the output format is set to 'jpeg'",
metavar="0-100",
type=partial(_type_range, 0, 100),
default=DEFAULT_OPTIONS["jpeg_quality"]
)
parser.add_argument(
"--%sopacity-threshold" % prefix,
help="threshold below which a pixel is considered transparent",
metavar="0-255",
type=partial(_type_range, 0, 255),
default=DEFAULT_OPTIONS["opacity_threshold"]
)