Error and Difference

ValidationError

exception datatest.ValidationError(message, differences)

Raised when a data validation fails.

message

The message given to the exception constructor.

differences

The differences given to the exception constructor.

args

The tuple of arguments given to the exception constructor.

Differences

class datatest.Missing(*args)

A value not found in data that is in requirement.

class datatest.Extra(*args)

A value found in data that is not in requirement.

class datatest.Invalid(invalid, expected=None)

A value in data that does not satisfy a function, equality, or regular expression requirement.

class datatest.Deviation(deviation, expected)

The difference between a numeric value in data and a matching numeric value in requirement.

deviation
percent_deviation
expected