- fail_on_mismatch = Constants.CRC_MISMATCH_FAILS_TEST
- try:
- from robot.libraries.BuiltIn import BuiltIn
- from_robot = BuiltIn().get_variable_value(
- "\${crc_mismatch_fails}", None)
- if from_robot is not None:
- # Robot interprets env vars as strings.
- fail_on_mismatch = not from_robot.lower() in ("false", "n", "0")
- except (ImportError, AttributeError):
- # If robot is not installed or not running, or value is not string,
- # the Constants value applies.
- pass