Repository navigation
Fix unexpected loading after print - #1724
Conversation
shoyer
left a comment
There was a problem hiding this comment.
Good catch! In the long term, it would be nice to get ride of these uses of _data, maybe by switching entirely from our lazy array classes to Dask.
| """ Make sure print does not load file into memory """ | ||
| in_memory = create_test_data() | ||
| with self.roundtrip(in_memory) as on_disk: | ||
| if not on_disk['var1']._in_memory: |
There was a problem hiding this comment.
Can we write this without the conditional check? It's usually best to avoid control flow in tests -- it makes it more obvious what is going on.
| in_memory = create_test_data() | ||
| with self.roundtrip(in_memory) as on_disk: | ||
| if not on_disk['var1']._in_memory: | ||
| print(on_disk) |
There was a problem hiding this comment.
Just call repr(on_disk) to avoid actually printing to stdout.
|
@shoyer
Maybe related to your previous comment in #1705? |
git diff upstream/master **/*py | flake8 --diffwhats-new.rstfor all changes andapi.rstfor new APIOnly a single missing underscore causes this issue :)
Added tests.