MatchFailure
- class aws_cdk.assertions.MatchFailure(*, matcher, message, path)
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]']
.
- ExampleMetadata:
fixture=_generated
Example:
# The code below shows an example of how to instantiate this type. # The values are placeholders you should change. import aws_cdk.assertions as assertions # matcher: assertions.Matcher match_failure = assertions.MatchFailure( matcher=matcher, message="message", path=["path"] )
Attributes
- 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]']
.