pact-foundation / pact-python

Python version of Pact. Enables consumer driven contract testing, providing a mock service and DSL for the consumer project, and interaction playback and verification for the service provider project.
http://pact.io
MIT License
568 stars 137 forks source link

Add structured `Mismatch` class #644

Open JP-Ellis opened 5 months ago

JP-Ellis commented 5 months ago

Have you read the Contributing Guidelines on issues?

Description

Replace the generic dict[str, Any] returned by a mismatch with a more informative class:

https://github.com/pact-foundation/pact-python/blob/5e52872b46fd6f959e958c130ebbe08ef8e11bbc/src/pact/v3/pact.py#L407-L412

Has this been requested on Canny?

No response

Motivation

A new class would facilitate the programmatic handling of mismatches, and avoid the use of Any.

Have you tried building it?

No response

Self-service