esptest.common.version module
- class esptest.common.version.VersionLimit(version_limit='')[source]
Bases:
objectRepresent a set of supported versions as one or more ranges.
Supported string formats:
v1.0meansv1.0to unlimited.Patch or multi-part versions are supported, for example
v1.0.1andv1.0.0-v2.0.3.v1.0-v2.0means the closed range[v1.0, v2.0].[v1.0-v2.0),(v1.0-v2.0], and(v1.0-v2.0)express open/closed boundaries; for example,(v3.0-v4.0]excludesv3.0andv3.0.0, but includesv3.0.1.(v1.0-)means versions greater thanv1.0to unlimited.Use
;to combine multiple ranges, for examplev1.0-v2.0; v4.0.
&returns the intersection,|returns the union, andremove()subtracts ranges.- Parameters:
version_limit (str)
- VERSION_LIMIT_PATTERN = re.compile('^\\s*(?P<left>[\\[\\(])?\\s*(?P<min_version>v?\\d+(?:\\.\\d+)*)(?:\\s*-\\s*(?P<max_version>v?\\d+(?:\\.\\d+)*)?)?\\s*(?P<right>[\\]\\)])?\\s*$')
- EMPTY_VERSION_LIMIT_STR = '<empty>'
- add(other)[source]
- Parameters:
other (str | VersionLimit)
- Return type:
- remove(other)[source]
- Parameters:
other (str | VersionLimit)
- Return type: