Skip to content

TST: make pytables tests go thru a temporary dir and file #5422

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

Closed
wants to merge 1 commit into from

Conversation

jreback
Copy link
Contributor

@jreback jreback commented Nov 3, 2013

TST/BUG: incorrect way of testing for r+ modes

related #5419

TST/BUG: incorrect way of testing for r+ modes
@jtratner
Copy link
Contributor

jtratner commented Nov 3, 2013

I just fixed the merge conflict on the related PR. Once it passes I'll merge it and then you can do this one. Sound good?

@jreback
Copy link
Contributor Author

jreback commented Nov 3, 2013

except don't put in any of the hdf stuff (or I can merge this first)

if filename is None:
filename = tempfile.mkstemp()[1]
# make sure that we are using a temp dir as well
suffix = filename if filename is not None and not len(os.path.dirname(filename)) else ''
Copy link
Contributor

Choose a reason for hiding this comment

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

Better to just do: if len(os.path.dirname(filename)): raise ValueError("Can't pass a directory path to ensure_clean") and then just do filename = filename or '' before that.

@jreback
Copy link
Contributor Author

jreback commented Nov 3, 2013

ok let me move this pr to your branch u can incorporate and merge all together

@jreback
Copy link
Contributor Author

jreback commented Nov 3, 2013

closing in favor of #5419

@jreback jreback closed this Nov 3, 2013
jtratner pushed a commit to jtratner/pandas that referenced this pull request Nov 3, 2013
jtratner added a commit to jtratner/pandas that referenced this pull request Nov 3, 2013
Includes @jreback's commits from pandas-dev#5422 and hdf_temp:
* TST: make pytables tests go thru a temporary dir and file
* TST/BUG: incorrect way of testing for r+ modes
jreback pushed a commit to jreback/pandas that referenced this pull request Nov 3, 2013
Includes @jreback's commits from pandas-dev#5422 and hdf_temp:
* TST: make pytables tests go thru a temporary dir and file
* TST/BUG: incorrect way of testing for r+ modes

TST: fix temporary files by using mktemp (rather than mkstemp) which opens them
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants