VulpesOS/gaia/tests/python/gaia-ui-tests/gaiatest/mixins/imagecompare.py
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

33 lines
1.3 KiB
Python
Executable file

# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
class GaiaImageCompareArguments(object):
name = 'Gaia Image Compare'
args = [
[['--store-reference-image'],
{'action': 'store_true',
'default': False,
'help': 'Store the captured screenshots as reference images',
}],
[['--fuzz-factor'],
{'type': int,
'default': 15,
'metavar': int,
'help': 'fuzz value supplied to ImageMagick call, in percentage. Default value is %(default)s percent.',
}],
[['--reference-path'],
{'default': 'reference_images',
'help': 'Location of reference images, relative to the current location, Default folder is %(default)s',
}],
[['--screenshots-path'],
{'default': 'screenshots',
'help': 'Path of screenshot images, relative to the current location, Default folder is %(default)s',
}]
]
# verify_usage
def verify_usage_handler(self, args):
if not 0 <= args.fuzz_factor <= 100:
raise ValueError('fuzz_factor must be between 0 and 100')