Skip to content

Test and fix for multidicts' .items(), .keys() and .values() repr#413

Merged
asvetlov merged 3 commits intomasterfrom
multidict_repr_fixes
Jun 16, 2015
Merged

Test and fix for multidicts' .items(), .keys() and .values() repr#413
asvetlov merged 3 commits intomasterfrom
multidict_repr_fixes

Conversation

@popravich
Copy link
Member

abc.ItemsView / KeysView / ValuesView has __repr__ method but it expects that data is stored in ._mapping attribute.

First commit is failing test, second -- the fix.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess _multidict.pyx also need __repr__ for _ViewBase.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, for sure)
I must say that test_muldict.py is almost as complicated as aiohttp parsers...
Can you point me where should I put tests for cython's multidict?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I suggest pushing along with test___repr__: https://github.com/KeepSafe/aiohttp/blob/master/tests/test_multidict.py#L269

Maybe I should refactor multidicts' test hierarchy.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tests already there

@popravich popravich force-pushed the multidict_repr_fixes branch from 9ba55a1 to 9bce9e5 Compare June 16, 2015 10:08
@popravich
Copy link
Member Author

Also fixed a typo in _multidict.pyx

asvetlov added a commit that referenced this pull request Jun 16, 2015
Test and fix for multidicts' .items(), .keys() and .values() repr
@asvetlov asvetlov merged commit d1b7e1c into master Jun 16, 2015
@asvetlov asvetlov deleted the multidict_repr_fixes branch June 16, 2015 15:18
@asvetlov
Copy link
Member

Thanks!

@lock
Copy link

lock bot commented Oct 30, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 30, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants