clrmethod working for python 2#494
Merged
filmor merged 8 commits intopythonnet:masterfrom Jun 16, 2017
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #494 +/- ##
==========================================
+ Coverage 74.24% 76.38% +2.14%
==========================================
Files 64 64
Lines 5564 5573 +9
Branches 894 896 +2
==========================================
+ Hits 4131 4257 +126
+ Misses 1147 1021 -126
- Partials 286 295 +9
Continue to review full report at Codecov.
|
Contributor
Author
|
It's a bit strange to do the Runtime.PyObject_IsIterable and Runtime.PyIter_Check tests from python, but I didn't want to add a new nunit project for the new unit tests. Possibly, that's something to consider for the future. Or is there a good place for nunit tests not related to the embedding? |
897828d to
1d33284
Compare
…ch does not have type feature iter
df75164 to
1a85eef
Compare
Member
|
I don't see a problem with adding those tests to what is currently called |
964c937 to
c9d7b71
Compare
c9d7b71 to
4be925f
Compare
filmor
approved these changes
Jun 16, 2017
Member
|
Thank you very much for this :) |
testrunner123
pushed a commit
to testrunner123/pythonnet
that referenced
this pull request
Sep 22, 2017
* Add Runtime.PyObject_IsIterable and fix PyIter_Check for Python 2 * Add test_clrmethod.py and update AUTHORS and CHANGELOG * Fix test docstrings * Use IntPtr.Zero instead of null for comparisons with IntPtrs * Add test on Runtime.PyObject_IsIterable and Runtime.PyIter_Check * Use the already defined TypeFlags.HaveIter instead of redefining it * Add PyIter_Check and PyObject_IsIterable tests on threading.Lock, which does not have type feature iter * Move the tests from test_runtime.py to TestRuntime.py
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
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this implement/fix? Explain your changes.
The issue #492 . It does this by replacing the call to PyIter_Check (which checks whether the object is an iterator) in PyObject.IsIterable by a call to the new method PyObject_IsIterable (which checks whether the object is an iterable). It also fixes the PyIter_Check for python 2, which has probably never worked.
...
Does this close any currently open issues?
#492
...
Any other comments?
...
Checklist
Check all those that are applicable and complete.
AUTHORSCHANGELOG