Skip to content

Commit

Permalink
Updated tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JoelLucaAdams authored and ZedThree committed Aug 2, 2024
1 parent 324858d commit d65c66d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tests/test_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@ def test_basic():
with xr.open_dataset(EXAMPLE_FILES_DIR / "0000.sdf") as df:
ex_field = "Electric Field/Ex"
assert ex_field in df
x_coord = "X_x_px_deltaf/electron_beam"
x_coord = "X_Grid_mid"
assert x_coord in df[ex_field].coords
assert df[x_coord].attrs["long_name"] == "X"


def test_coords():
with xr.open_dataset(EXAMPLE_FILES_DIR / "0010.sdf") as df:
px_electron = "dist_fn/x_px/electron"
assert px_electron in df
x_coord = "Px_x_px/electron"
assert x_coord in df[px_electron].coords
assert df[x_coord].attrs["long_name"] == "Px"

0 comments on commit d65c66d

Please sign in to comment.