Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Special case maps with only value keys #2257

Merged
merged 6 commits into from
Oct 2, 2024
Merged

Special case maps with only value keys #2257

merged 6 commits into from
Oct 2, 2024

Commits on Jul 22, 2024

  1. Special case maps with only value keys

    Closes #2256
    
    When checking deep equality on Map instances (including maps nested in
    other collection types) we allow keys which are instances of other
    collection (and don't have a useful `operator ==`) and keys which are
    `Condition` callbacks that could potentially match multiple keys of the
    actual value. This is maximally flexible, but it loses the nested path
    information we are otherwise able to keep for iterables compared by
    index.
    
    Check whether expectation maps have any keys which need this special
    treatment, and if not, special case to an algorithm close to the
    `Iterable` algorithm which can enqueue nested checks and maintain the
    direct known path into the collection.
    
    Update the doc comment to describe the new behavior. This does
    potentially introduce confusion since a change which adds a `Condition`
    key has to potential to make _other_ keys in the same expectation
    behaved differently. The benefit is a more actionable failure output for
    the much more common case of checking expectations with hardcoded keys.
    natebosch committed Jul 22, 2024
    Configuration menu
    Copy the full SHA
    a58f5cd View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a9cdf61 View commit details
    Browse the repository at this point in the history

Commits on Jul 23, 2024

  1. Configuration menu
    Copy the full SHA
    fe6f315 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d0b089c View commit details
    Browse the repository at this point in the history

Commits on Sep 27, 2024

  1. Configuration menu
    Copy the full SHA
    1edc84f View commit details
    Browse the repository at this point in the history

Commits on Oct 1, 2024

  1. Configuration menu
    Copy the full SHA
    18d533f View commit details
    Browse the repository at this point in the history