-
-
Notifications
You must be signed in to change notification settings - Fork 169
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
[BUG] Two Calendar
objects with different events should not ==
each other
#526
Comments
Hello Alex, thanks for reporting this. Can you show a bit more code of how you load the calendars? When are they not equal? I did not fully understand how equality is determined. Also: How is this equality universal for all the sub-components?
|
Thanks for looking into this.
My expectation would be that
Sorry, but I don't immediately understand what is being asked. Could you please rephrase? Looking broadly at the codebase, it seems that the equality checking is done in icalendar/src/icalendar/caselessdict.py Lines 88 to 89 in b8ff114
which to me is doubly surprising, because at first glance, this should return |
I am wondering: Could you post two ICS files that evaluate as equal but
are actually not equal?
|
@niccokunzmann |
See also #570. |
Describe the bug
Given two
Calendar
objects being loaded from a .ics file (one fresh, one cached):I would expect (and attempted to rely upon) the
==
operator to reliably test whether they're the same or not (so I can avoid emitting "changes" when no changes have occurred).calendar_a == calendar_b
in all cases, regardless of whether their contents differ.Expected behavior
The
==
operator correctly returnsTrue
orFalse
depending on content.The text was updated successfully, but these errors were encountered: