atef.check.Value

class atef.check.Value(value: str | int | bool | float, description: str = '', rtol: int | float | None = None, atol: int | float | None = None, severity: Severity = Severity.success)[source]

A primitive (static) value with optional metadata.

Attributes:
atol
rtol

Methods

compare(value)

Compare the provided value with this one, using tolerance settings.

get()

Get the value from this container.

Methods

__init__(value: str | int | bool | float, description: str = '', rtol: int | float | None = None, atol: int | float | None = None, severity: Severity = Severity.success) None
compare(value: str | int | bool | float) bool[source]

Compare the provided value with this one, using tolerance settings.

get() str | int | bool | float[source]

Get the value from this container.

Attributes

atol: int | float | None = None

Absolute tolerance value.

description: str = ''

A description of what the value represents.

rtol: int | float | None = None

Relative tolerance value.

severity: Severity = 0

Severity to set on a match (if applicable).

value: str | int | bool | float

The value for comparison.