home / github / issue_comments

Menu
  • Search all tables
  • GraphQL API

issue_comments: 536231578

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions performed_via_github_app issue
https://github.com/pydata/xarray/issues/1668#issuecomment-536231578 https://api.github.com/repos/pydata/xarray/issues/1668 536231578 MDEyOklzc3VlQ29tbWVudDUzNjIzMTU3OA== 5635139 2019-09-28T22:58:40Z 2019-09-28T22:58:40Z MEMBER

We currently try to explicitly close any temp files we created at the end of each test. Are you suggesting that we should leave that clean-up to the operating system?

IIUC (and my understand isn't advanced here!), python will close and delete temp files & directories once they leave scope:

From https://docs.python.org/3/library/tempfile.html#examples

```

create a temporary file using a context manager

with tempfile.TemporaryFile() as fp: ... fp.write(b'Hello world!') ... fp.seek(0) ... fp.read() b'Hello world!'

file is now closed and removed

``` https://docs.python.org/3/library/tempfile.html#tempfile.TemporaryDirectory

Or is it that we want to test that they're closed?

{
    "total_count": 0,
    "+1": 0,
    "-1": 0,
    "laugh": 0,
    "hooray": 0,
    "confused": 0,
    "heart": 0,
    "rocket": 0,
    "eyes": 0
}
  269348789
Powered by Datasette · Queries took 319.897ms · About: xarray-datasette