fatf.utils.tools.at_least_verion

fatf.utils.tools.at_least_verion(minimum_requirement, package_version)[source]

Checks if the package_version satisfies the minimum_requirement.

Both package_version and minimum_requirement are lists of integers representing Python package versions, e.g. [1, 16, 4]. This function returns True if the package_version is at least as high as the minimum_requirement version.

The package_version list has to be at least as long as the minimum_requirement list, otherwise a ValueError exception is raised.

Parameters
minimum_requirementList[integer]

The minimum Python package version that is required.

package_versionlist[integer]

The Python package version to be tested.

Returns
is_compatibleboolean

True if the package_version satisfies the minimum_requirement, False otherwise.

Raises
TypeError

Either of the parameters is not a list or the elements of the lists are not integers.

ValueError

Raised when either of the input lists is empty and when the package_version list is shorter than the minimum_requirement list.