File tree 1 file changed +7
-4
lines changed
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 2
2
Test the behaviour of the GMTDataArrayAccessor class.
3
3
"""
4
4
import os
5
- from calendar import day_abbr
6
5
from pathlib import Path
7
6
8
7
import pytest
@@ -130,6 +129,10 @@ def test_accessor_grid_source_file_not_found():
130
129
# manually set the registration and gtype
131
130
dataset .height .gmt .registration = 1
132
131
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