-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix make_signature TypeError in py3 #17609
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
pandas/tests/util/test_util.py
Outdated
|
||
def test_make_signature(): | ||
# See GH 17608 | ||
_ = make_signature(validate_kwargs) |
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.
you need to assert something here
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 test will fail under the status quo.
Codecov Report
@@ Coverage Diff @@
## master #17609 +/- ##
==========================================
+ Coverage 91.19% 91.2% +<.01%
==========================================
Files 163 163
Lines 49625 49625
==========================================
+ Hits 45257 45260 +3
+ Misses 4368 4365 -3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #17609 +/- ##
==========================================
+ Coverage 91.19% 91.2% +<.01%
==========================================
Files 163 163
Lines 49625 49652 +27
==========================================
+ Hits 45257 45285 +28
+ Misses 4368 4367 -1
Continue to review full report at Codecov.
|
Travis error looks unrelated:
|
pandas/tests/util/test_util.py
Outdated
make_signature(validate_kwargs) | ||
# Case where the func does not have default kwargs | ||
make_signature(deprecate_kwarg) | ||
# Case where the func does have default kwargs |
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.
Can you move your comments above the test you're running?
pandas/tests/util/test_util.py
Outdated
def test_make_signature(): | ||
# See GH 17608 | ||
# Case where the func does not have default kwargs | ||
make_signature(validate_kwargs) |
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.
what is this doing now and what does this fix?
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.
The case on line 476 raises a TypeError in py3. See #17608.
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 works for me in py3 now, so its not a good enough example
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.
Before I dig into this, did you run make_signature
with both cases in the test? My last comment had a typo, should have said line 477.
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 ran make_signature(validate_kwargs)
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.
pls try the call in the next line make_signature(deprecate_kwarg)
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.
ok this is fine. but still put an expected result and test against that, otherwise lgtm.
lgtm ping on green. |
ping. pls consider re-opening #17600, as it fixes a problem that caused this to fail silently. |
thanks. see my comments for #17600 |
xref #17608
git diff upstream/master -u -- "*.py" | flake8 --diff