EastAgile / robber.py

BDD / TDD assertion library for Python
MIT License
8 stars 1 forks source link

Deep explanation for dict & OrderedDict #48

Closed hieueastagile closed 7 years ago

hieueastagile commented 7 years ago
A = OrderedDict([('id', None), ('first_name', u'Foo'), ('middle_initial', u'A'), ('last_name', u'Bar'), ('gender', u'M'), ('race', u'W'), ('appointed_date', None), ('rank', u''), ('birth_year', 1991), ('active', None), ('officerhistory_set', []), ('officerbadgenumber_set', [])])
B = {'last_name': 'Bar', 'officerbadgenumber_set': [], 'rank': '', 'active': None, 'appointed_date': None, 'middle_initial': 'A', 'first_name': 'Foo', 'gender': 'M', 'race': 'W', 'officerhistory_set': [], 'birth_year': 1991}
Expected A to equal B

When we try to compare an OrderedDict and a dict, the message is still not good enough.