-
Notifications
You must be signed in to change notification settings - Fork 65
Re-implement iteration for paging.Paged #22
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #22 +/- ##
==========================================
+ Coverage 88.52% 88.78% +0.25%
==========================================
Files 10 10
Lines 1229 1239 +10
==========================================
+ Hits 1088 1100 +12
+ Misses 141 139 -2
Continue to review full report at Codecov.
|
| self.next_link = "" | ||
| self.current_page = [] | ||
| self._current_page_iter_index = 0 | ||
| self._derserializer = Deserializer(classes) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you take this opputunity to fix the typo in the "deRserializer" attribute? :)
msrest/paging.py
Outdated
| self.reset() | ||
| self.next_link = url | ||
| return self.next() | ||
| return list(self) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work if there is a page3. Current code will return page 2 + page 3. Yes, I miss this unittest... :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why wouldn't it work? This is simply exhausting the iterator so if a "page 3" would have come through the iterator then this will as well.
And are you adding a test for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added a test in master
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in the latest commit.
No description provided.