Closed ErwinJunge closed 5 years ago
FYI: the travis errors are not related to the code changes in this PR, they have something to do with travis setting up py32 and py33.
Thanks for the pull request. Rebasing onto master should fix the Python 3.2 and 3.3 errors (by dropping support).
I'm not sure the naming of the function is very clear. We already have an includes()
function for iterables. Perhaps mapping_includes
would be clearer?
Thanks for the pull request. Rebasing onto master should fix the Python 3.2 and 3.3 errors (by dropping support).
I'm not sure the naming of the function is very clear. We already have an
includes()
function for iterables. Perhapsmapping_includes
would be clearer?
Rebased. The naming ties into https://github.com/mwilliamson/python-precisely/pull/14 where I introduce is_sequence_with
(which is subtly different from includes
)
I'm not sure is_sequence_with()
is the right name in the other pull request ("with" doesn't imply the subsetting behaviour to me), and this feels closer to includes()
than is_sequence_with()
since this doesn't care about ordering.
Thanks! I've merged this, and made a couple of minor tweaks to the implementation.
This adds a matcher called is_mapping_with to allow partial dict matches (i.e. allow extra keys).