-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
Split test_excel into submodule #26755
Conversation
|
||
|
||
@pytest.fixture | ||
def df_ref(): |
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.
Similar comment as above but this would only be used in the reader tests
|
||
|
||
@pytest.fixture(params=[True, False]) | ||
def merge_cells(request): |
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.
Also only used in writers
Codecov Report
@@ Coverage Diff @@
## master #26755 +/- ##
==========================================
- Coverage 91.7% 91.69% -0.01%
==========================================
Files 179 179
Lines 50767 50767
==========================================
- Hits 46555 46552 -3
- Misses 4212 4215 +3
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #26755 +/- ##
==========================================
- Coverage 91.7% 91.69% -0.01%
==========================================
Files 179 178 -1
Lines 50767 50758 -9
==========================================
- Hits 46555 46543 -12
- Misses 4212 4215 +3
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.
Yea I think the init is a good idea to preserve the namespacing so just pushed. Also updated OP to reflect closure of issue |
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.
Thanks @WillAyd . Nice!
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.
so
- you can use pytest.importorskip here and directly import things
- If you can not use the class structure I would do it. Since this changes lots of code I would do it in this PR.
from pandas.io.excel import ExcelWriter, _OpenpyxlWriter | ||
|
||
|
||
@td.skip_if_no('openpyxl') |
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.
use a pytest.importorskip
also I would not use classes unless you have separate discrete cases
|
||
tm.assert_frame_equal(expected, actual) | ||
|
||
@td.skip_if_no('py.path') |
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 remove this test entirely
|
||
class TestReaders: | ||
|
||
@pytest.fixture(autouse=True, params=[ |
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 these just be module pytest.importorskip?
register_writer) | ||
|
||
|
||
@td.skip_if_no('xlrd') |
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.
same comment as above
from pandas.io.excel import ExcelFile | ||
|
||
|
||
@td.skip_if_no('xlrd') |
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.
same comment
@jreback IIUC this is just a plain split and move, no changes. your comments will be addressed in follow-ups. |
ok that's fine |
@simonjayhawkins that would be great - thanks for offering! |
@simonjayhawkins
Just moved everything as is. Some of the class structures are unnecessary now but leaving for follow ups