File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 1
1
import warnings
2
2
3
+ from .utils import FrozenDict
4
+
3
5
ARITHMETIC_JOIN = "arithmetic_join"
4
6
CMAP_DIVERGENT = "cmap_divergent"
5
7
CMAP_SEQUENTIAL = "cmap_sequential"
@@ -250,4 +252,4 @@ def get_options():
250
252
expand, ``False`` to always collapse, or ``default`` to expand unless over
251
253
a pre-defined limit. Default: ``default``.
252
254
"""
253
- return OPTIONS
255
+ return FrozenDict ( OPTIONS )
Original file line number Diff line number Diff line change @@ -203,3 +203,10 @@ def test_display_dataarray_style_html(self):
203
203
html = da ._repr_html_ ()
204
204
assert html .startswith ("<div>" )
205
205
assert "#x27;nested'" in html
206
+
207
+
208
+ def test_get_options_retention ():
209
+ """Test to check if get_options will return changes made by set_options"""
210
+ with xarray .set_options (arithmetic_join = "left" ):
211
+ get_options = xarray .get_options ()
212
+ assert get_options ["arithmetic_join" ] == "left"
You can’t perform that action at this time.
0 commit comments