Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Summary
This adds implementation for all FFI functions which act on an
InteractionHandle
. Most of these map in Python to a method of theInteraction
class.As the InteractionHandle can point to a HTTP, Sync Message or Async Message Interaction, the initial
Interaction
class has been converted into an abstract class, and then subclassed into three new concrete classes. This will help end-users specifically when it comes to auto-completions within the IDE.A couple of minor changes have also been included in this PR in separate commits:
chore(test): automatically generated xml coverage
This can be used by other tools to generate coverage reports, or to annotate code within the IDE.
fix(v3): unconventional repr implementation
The repr implementation should produce one of:
eval()
to generate the same object.<{class_name}: {info}>
.A few of the implementations did not quite adhere to this convention and have been fixed.
🚨 Breaking ChangesOnly impacting v3 submodule, which makes not stability guarantees.
🔥 Motivation
Part of the development of Pact Python version 3
🔨 Test Plan
Unit tests have been included, with a couple of caveats:
aiohttp
and Pact libraries to generate mutually compatible payloads. As this is one of the lesser used feature, I think it is reasonable for have this merged for now and add a ticket to the backlog.SyncMessageInteraction
andAsyncMessageInteraction
are implemented, but only insofar as to test their instantiation. They are not tested any further.🔗 Related issues/PRs
Interaction
#419