FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Adding iterator method to Dict by kellrott · Pull Request #59 · go-python/gpython · GitHub

Adding iterator method to Dict - #59

Merged
ncw merged 8 commits into
go-python:masterfrom
bmeg:dict-iterator
Jun 3, 2019
Merged

Adding iterator method to Dict#59
ncw merged 8 commits into
go-python:masterfrom
bmeg:dict-iterator

Conversation

Copy link
Copy Markdown
Contributor

Addresses #58

codecov-io commented May 17, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #59 into master will increase coverage by 0.44%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #59      +/-   ##
==========================================
+ Coverage   67.94%   68.38%   +0.44%     
==========================================
  Files          59       59              
  Lines       10378    10435      +57     
==========================================
+ Hits         7051     7136      +85     
+ Misses       2828     2794      -34     
- Partials      499      505       +6
Impacted Files Coverage Δ
py/dict.go 63.21% <100%> (+8.55%) ⬆️
py/type.go 51.54% <0%> (+0.32%) ⬆️
py/string.go 88.2% <0%> (+2.88%) ⬆️
py/list.go 25.44% <0%> (+4.14%) ⬆️
py/sequence.go 52.68% <0%> (+18.27%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 61059b4...a39291e. Read the comment docs.

sbinet left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

thanks for tackling this.

could you also add a test exercizing this new feature?
thanks!

Comment thread py/dict.go

ncw commented May 18, 2019

Copy link
Copy Markdown
Collaborator

According to the coverage report your test doesn't hit your added code?

https://codecov.io/gh/go-python/gpython/pull/59/diff

Copy link
Copy Markdown
Contributor Author

The code is covered in py/tests/dict.py line 17, but the system doesn't seem to recognize that.

ncw left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

That is looking good! Can you just sharpen the test slightly and I'll merge - thanks :-)

Comment thread py/tests/dict.py Outdated

doc="check __iter__"
a = {"a":"b","c":5.5}
assert "a" in a

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Strictly speaking this test will no longer work when we implement the __contains__ method for dict.

Do can you change it to something like

l =  list(iter(a))
assert "a" in l
assert "c" in l
assert len(l) == 2

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This should be fixed now

ncw commented Jun 3, 2019

Copy link
Copy Markdown
Collaborator

That looks great now thank you! I see you added an items method too :-)

Will merge now.

ncw merged commit 7f6244e into go-python:master Jun 3, 2019
kellrott deleted the dict-iterator branch December 24, 2022 03:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL