Skip to content

Commit

Permalink
Silence more.
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jan 3, 2024
1 parent 5ececd1 commit fb4121f
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -4417,13 +4417,19 @@ def test_inline_array(self) -> None:
def num_graph_nodes(obj):
return len(obj.__dask_graph__())

not_inlined_ds = open_dataset(tmp, inline_array=False, chunks=chunks)
inlined_ds = open_dataset(tmp, inline_array=True, chunks=chunks)
assert num_graph_nodes(inlined_ds) < num_graph_nodes(not_inlined_ds)

not_inlined_da = open_dataarray(tmp, inline_array=False, chunks=chunks)
inlined_da = open_dataarray(tmp, inline_array=True, chunks=chunks)
assert num_graph_nodes(inlined_da) < num_graph_nodes(not_inlined_da)
with open_dataset(
tmp, inline_array=False, chunks=chunks
) as not_inlined_ds, open_dataset(
tmp, inline_array=True, chunks=chunks
) as inlined_ds:
assert num_graph_nodes(inlined_ds) < num_graph_nodes(not_inlined_ds)

with open_dataarray(
tmp, inline_array=False, chunks=chunks
) as not_inlined_da, open_dataarray(
tmp, inline_array=True, chunks=chunks
) as inlined_da:
assert num_graph_nodes(inlined_da) < num_graph_nodes(not_inlined_da)


@requires_scipy_or_netCDF4
Expand Down

0 comments on commit fb4121f

Please sign in to comment.