Skip to content

Commit

Permalink
test: update file group check to use datatree
Browse files Browse the repository at this point in the history
  • Loading branch information
lsetiawan committed Aug 3, 2023
1 parent 05a69ad commit 90f4a45
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions echopype/tests/convert/test_convert_source_target_locs.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,16 @@
import fsspec
import xarray as xr
import pytest
from datatree import open_datatree
from tempfile import TemporaryDirectory
from echopype import open_raw
from echopype.utils.coding import DEFAULT_ENCODINGS


def _check_file_group(data_file, engine, groups):
for g in groups:
ds = xr.open_dataset(data_file, engine=engine, group=g)

tree = open_datatree(data_file, engine=engine)
for group in groups:
ds = tree[f"/{group}"].ds
assert isinstance(ds, xr.Dataset) is True


Expand Down

0 comments on commit 90f4a45

Please sign in to comment.