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

Comparing ImmutableObjects yields unexpected results #837

tkem opened this Issue Aug 24, 2014 · 3 comments


3 participants

tkem commented Aug 24, 2014

mopidy.models.ImmutableObject has __eq__ and __ne__ methods, but they sometimes yield unexpected results:

For example, I expected the following to all yield True, since the respective attributes compare equal:

from mopidy.models import Track
Track(name='foo', album=None) == Track(name='foo')
Track(name='foo', album=None) == Track(name='foo', album=None, track_no=0)
Track(name='foo', album=None) == Track(name='bar', album=None).copy(name='foo')

@adamcik adamcik added this to the v0.20 - Audio cleanup milestone Sep 3, 2014

@adamcik adamcik added bug labels Sep 3, 2014

@jodal jodal self-assigned this Sep 22, 2014

@jodal jodal closed this in bdd1fb9 Sep 22, 2014

@tkem tkem referenced this issue Oct 24, 2014


Improve Unit Tests #4


This comment has been minimized.


tkem commented Nov 4, 2014

May I suggest this for the v0.19.5 milestone? Writing backend unit tests would be much more fun with this...

@jodal jodal modified the milestones: v0.19.5 - Bug fixes, v0.20 - Audio cleanup Nov 4, 2014

jodal added a commit that referenced this issue Nov 4, 2014

models: Fix equality for fields set to the default
Fixes #837

(cherry picked from commit bdd1fb9)

This comment has been minimized.


jodal commented Nov 4, 2014

Done :-)


This comment has been minimized.


tkem commented Nov 4, 2014

A small step for a man...

teq0 added a commit to teq0/mopidy that referenced this issue Feb 3, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment