File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 22Test the behaviour of the GMTDataArrayAccessor class.
33"""
44import os
5- from calendar import day_abbr
65from pathlib import Path
76
87import pytest
@@ -130,6 +129,10 @@ def test_accessor_grid_source_file_not_found():
130129 # manually set the registration and gtype
131130 dataset .height .gmt .registration = 1
132131 dataset .height .gmt .gtype = 1
133- # the registration and gtype should be correct now.
134- assert dataset .height .gmt .registration == 1
135- assert dataset .height .gmt .gtype == 1
132+ # the registration and gtype still have default values.
133+ # Quote from https://docs.xarray.dev/en/stable/internals/extending-xarray.html
134+ # > New instances, like those created from arithmetic operations or when
135+ # > accessing a DataArray from a Dataset (ex. ds[var_name]), will have
136+ # > new accessors created.
137+ assert dataset .height .gmt .registration == 0
138+ assert dataset .height .gmt .gtype == 0
You can’t perform that action at this time.
0 commit comments