Skip to content

Commit 125e677

Browse files
committed
auto test
1 parent 83fb9f7 commit 125e677

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

tests/test_10_client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@ def test_download(tmp_path: Path) -> None:
99
selection,
1010
esgpull_path=str(tmp_path / "esgpull"),
1111
)
12-
assert len(client.missing_files) == 1
12+
1313
downloaded = client.download()
1414
assert len(downloaded) == 1
15-
assert len(client.missing_files) == 0
1615

1716
downloaded = client.download()
1817
assert len(downloaded) == 0

xarray_esgf/client.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ def open_dataset(
106106
if isinstance(concat_dims, str):
107107
concat_dims = [concat_dims]
108108

109+
self.download()
110+
109111
datasets = []
110112
for dataset_id, paths in self.local_paths.items():
111113
ds = xr.open_mfdataset(

xarray_esgf/engine.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ def open_dataset( # type: ignore[override]
2222
esgpull_path=esgpull_path,
2323
index_node=index_node,
2424
)
25-
client.download()
2625
return client.open_dataset(
2726
concat_dims=concat_dims,
2827
drop_variables=drop_variables,

0 commit comments

Comments
 (0)