Skip to content
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

Move ExcelWriter Tests #26740

Merged
merged 4 commits into from
Jun 8, 2019
Merged

Conversation

WillAyd
Copy link
Member

@WillAyd WillAyd commented Jun 8, 2019

Because read_excel and ExcelWriter have different parametrization requirements it makes things clearer for now to separate these out.

Maybe longer term they can be more intelligently combined but for now I think this still helps clean up requirements for adding new engines

@simonjayhawkins

@WillAyd WillAyd added IO Excel read_excel, to_excel Testing pandas testing functions or related to the test suite labels Jun 8, 2019


@pytest.fixture(params=['.xls', '.xlsx', '.xlsm'])
def read_ext(request):
Copy link
Member Author

@WillAyd WillAyd Jun 8, 2019

Choose a reason for hiding this comment

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

The majority of this PR is a result of renaming this fixture so as not to conflict with the valid extensions for writing


assert f.closed


@td.skip_if_no('xlrd')
@pytest.mark.parametrize("ext", ['.xls', '.xlsx', '.xlsm'])
Copy link
Member Author

Choose a reason for hiding this comment

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

This parametrization is still dangling and probably should use read_ext but for now I'm putting any tests that concern themselves with writing on the back burner, since reading is where most community engagement has been outstanding

@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #26740 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26740      +/-   ##
==========================================
- Coverage   91.78%   91.77%   -0.01%     
==========================================
  Files         174      174              
  Lines       50703    50703              
==========================================
- Hits        46538    46534       -4     
- Misses       4165     4169       +4
Flag Coverage Δ
#multiple 90.37% <ø> (ø) ⬆️
#single 41.81% <ø> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️

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 3937fbc...cb5d640. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Jun 8, 2019

Codecov Report

Merging #26740 into master will decrease coverage by <.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #26740      +/-   ##
==========================================
- Coverage   91.78%   91.77%   -0.01%     
==========================================
  Files         174      174              
  Lines       50703    50703              
==========================================
- Hits        46538    46534       -4     
- Misses       4165     4169       +4
Flag Coverage Δ
#multiple 90.37% <ø> (ø) ⬆️
#single 41.81% <ø> (-0.09%) ⬇️
Impacted Files Coverage Δ
pandas/io/gbq.py 78.94% <0%> (-10.53%) ⬇️
pandas/core/frame.py 96.88% <0%> (-0.12%) ⬇️

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 3937fbc...cb5d640. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Jun 8, 2019

so maybe as a pre-cursor (after ok too) I would create pandas/tests/io/excel/test_excel, test_excel_writer and so on to make this much easier to grok

@WillAyd
Copy link
Member Author

WillAyd commented Jun 8, 2019

Yea definitely needs to be split into submodules. I can do that one next PR

@jreback jreback added this to the 0.25.0 milestone Jun 8, 2019
@jreback
Copy link
Contributor

jreback commented Jun 8, 2019

ok thanks @WillAyd

@simonjayhawkins quick look if you would. merge if ok.

Copy link
Member

@simonjayhawkins simonjayhawkins left a comment

Choose a reason for hiding this comment

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

@WillAyd lgtm. it might be worth (in a follow-on), since read_excel is patched anyway, to patch for the filename extension as well. it could remove some visual noise.

@simonjayhawkins simonjayhawkins merged commit be2face into pandas-dev:master Jun 8, 2019
@simonjayhawkins
Copy link
Member

thanks @WillAyd

@WillAyd WillAyd deleted the excel-test-moves branch June 9, 2019 01:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO Excel read_excel, to_excel Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants