Skip to content

add unit test for writing to already open file #21696

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

Merged
merged 2 commits into from
Jul 2, 2018

Conversation

jdrudolph
Copy link
Contributor

@jdrudolph jdrudolph commented Jul 1, 2018

  • closes
  • tests added / passed
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

closes #21577
The added unit test will pass for 0.23.0, fails for 0.23.1, passes for master.

@codecov
Copy link

codecov bot commented Jul 1, 2018

Codecov Report

Merging #21696 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #21696   +/-   ##
=======================================
  Coverage    91.9%    91.9%           
=======================================
  Files         154      154           
  Lines       49657    49657           
=======================================
  Hits        45638    45638           
  Misses       4019     4019
Flag Coverage Δ
#multiple 90.28% <ø> (ø) ⬆️
#single 41.9% <ø> (ø) ⬆️

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 dc45fba...f018837. Read the comment docs.

@jreback
Copy link
Contributor

jreback commented Jul 2, 2018

@chris-b1 @gfyoung can you have a look.

@jreback jreback added Testing pandas testing functions or related to the test suite Output-Formatting __repr__ of pandas objects, to_string IO CSV read_csv, to_csv labels Jul 2, 2018
y
z
'''
with tm.ensure_clean('test.txt') as path:
Copy link
Contributor

Choose a reason for hiding this comment

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

can you parameterize this with flush (both on and off), or does this matter?

Copy link
Member

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 matters.

@jreback
Copy link
Contributor

jreback commented Jul 2, 2018

does this close #21577 - is this a bug? or is it fixed by the recent fixed regression in to_csv?

@gfyoung
Copy link
Member

gfyoung commented Jul 2, 2018

does this close #21577 - is this a bug? or is it fixed by the recent fixed regression in to_csv?

@jreback : I would close #21577 with this PR. Seems to have been addressed somehow on master.

@jreback jreback added this to the 0.24.0 milestone Jul 2, 2018
@jreback jreback merged commit fa3511b into pandas-dev:master Jul 2, 2018
@jreback
Copy link
Contributor

jreback commented Jul 2, 2018

thanks @jdrudolph

@jdrudolph jdrudolph deleted the test_to_csv_write_to_ope_file branch July 3, 2018 09:57
Sup3rGeo pushed a commit to Sup3rGeo/pandas that referenced this pull request Oct 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO CSV read_csv, to_csv Output-Formatting __repr__ of pandas objects, to_string Testing pandas testing functions or related to the test suite
Projects
None yet
3 participants