-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
Add _expand_user to _stringify_path as we need to allow tilde - ~, to expand to full path #23769
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
Hello @srinivasreddy! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on January 05, 2019 at 18:39 Hours UTC |
we have some tests in io/test_common.py ; do these need to be expanded? |
Nope. I do not see the need. build pass should make it good to go. |
ok, can you add a whatsnew note |
Codecov Report
@@ Coverage Diff @@
## master #23769 +/- ##
==========================================
+ Coverage 92.37% 92.37% +<.01%
==========================================
Files 166 166
Lines 52379 52379
==========================================
+ Hits 48386 48387 +1
+ Misses 3993 3992 -1
Continue to review full report at Codecov.
|
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 actually would prefer adding a test case here which could be parametrized like say test_read_non_existant
within the same module.
pandas/tests/io/test_common.py
Outdated
pytest.importorskip(module) | ||
|
||
path = os.path.join('~', 'does_not_exist.' + fn_ext) | ||
with pytest.raises(error_class): |
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 don't think this test actually does anything within the context of this change. Is there a way to make a stronger assertion about this actually working?
Another option may be to patch a call to _expand_user
and assert it gets called via these functions
can you merge master and address comments |
can you merge master |
@pandas-dev/pandas-core if someone can merge master and update the test |
Sure I'll take a look |
pytest.importorskip(module) | ||
|
||
path = os.path.join('~', 'does_not_exist.' + fn_ext) | ||
monkeypatch.setattr(icom, '_expand_user', |
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 alternately use mock.assert_called
for this test but didn't see that library used anywhere else and I know we've been removing it from other instances, so this is an alternate way of using monkey patch to get to the same place
@jreback all green let me know your thoughts |
thanks @srinivasreddy & @WillAyd |
… expand to full path (pandas-dev#23769)
… expand to full path (pandas-dev#23769)
git diff upstream/master -u -- "*.py" | flake8 --diff