MatchFailure
- class aws_cdk.assertions.MatchFailure(*, matcher, message, path, cost=None)
Bases:
object
Match failure details.
- Parameters:
matcher (
Matcher
) – The matcher that had the failure.message (
str
) – Failure message.path (
Sequence
[str
]) – The relative path in the target where the failure occurred. If the failure occurred at root of the match tree, set the path to an empty list. If it occurs in the 5th index of an array nested within the ‘foo’ key of an object, set the path as['/foo', '[5]']
.cost (
Union
[int
,float
,None
]) – The cost of this particular mismatch. Default: 1
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. from aws_cdk import assertions # matcher: assertions.Matcher match_failure = assertions.MatchFailure( matcher=matcher, message="message", path=["path"], # the properties below are optional cost=123 )
Attributes
- cost
The cost of this particular mismatch.
- Default:
1
- matcher
The matcher that had the failure.
- message
Failure message.
- path
The relative path in the target where the failure occurred.
If the failure occurred at root of the match tree, set the path to an empty list. If it occurs in the 5th index of an array nested within the ‘foo’ key of an object, set the path as
['/foo', '[5]']
.