This document is for an old release of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.

Source code for galaxy.tool_util.verify.asserts.size

from ._util import _assert_number

[docs]def assert_has_size(output_bytes, value: int = None, delta: int = 0, min: int = None, max: int = None, negate: bool = False): """ Asserts the specified output has a size of the specified value, allowing for absolute (delta) and relative (delta_frac) difference. """ output_size = len(output_bytes) _assert_number(output_size, value, delta, min, max, negate, "{expected} file size of {n}+-{delta}", "{expected} file size to be in [{min}:{max}]")