You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
conftest.py defines an ApproxDict, which is a subclass of dict, whose equality method has been overridden such that, if a and b are dictionaries, then a == ApproxDict(b) will have the same truth value as a.items() >= b.items() (i.e. a is equal to ApproxDict(b) if a's key-value pairs are a superset of b's key-value pairs).
Since a.items() >= b.items() is a much clearer assertion than a == ApproxDict(b), let's replace usages of ApproxDict in our test suite with the more explicit assertion.
The text was updated successfully, but these errors were encountered:
czyber
added a commit
to czyber/sentry-python
that referenced
this issue
Aug 1, 2024
conftest.py
defines anApproxDict
, which is a subclass ofdict
, whose equality method has been overridden such that, ifa
andb
are dictionaries, thena == ApproxDict(b)
will have the same truth value asa.items() >= b.items()
(i.e.a
is equal toApproxDict(b)
ifa
's key-value pairs are a superset ofb
's key-value pairs).Since
a.items() >= b.items()
is a much clearer assertion thana == ApproxDict(b)
, let's replace usages ofApproxDict
in our test suite with the more explicit assertion.The text was updated successfully, but these errors were encountered: