@@ -68,12 +68,12 @@ def test_nested_options():
68
68
69
69
70
70
def test_display_style ():
71
- original = "text "
71
+ original = "html "
72
72
assert OPTIONS ["display_style" ] == original
73
73
with pytest .raises (ValueError ):
74
74
xarray .set_options (display_style = "invalid_str" )
75
- with xarray .set_options (display_style = "html " ):
76
- assert OPTIONS ["display_style" ] == "html "
75
+ with xarray .set_options (display_style = "text " ):
76
+ assert OPTIONS ["display_style" ] == "text "
77
77
assert OPTIONS ["display_style" ] == original
78
78
79
79
@@ -177,10 +177,11 @@ def test_merge_attr_retention(self):
177
177
178
178
def test_display_style_text (self ):
179
179
ds = create_test_dataset_attrs ()
180
- text = ds ._repr_html_ ()
181
- assert text .startswith ("<pre>" )
182
- assert "'nested'" in text
183
- assert "<xarray.Dataset>" in text
180
+ with xarray .set_options (display_style = "text" ):
181
+ text = ds ._repr_html_ ()
182
+ assert text .startswith ("<pre>" )
183
+ assert "'nested'" in text
184
+ assert "<xarray.Dataset>" in text
184
185
185
186
def test_display_style_html (self ):
186
187
ds = create_test_dataset_attrs ()
@@ -191,9 +192,10 @@ def test_display_style_html(self):
191
192
192
193
def test_display_dataarray_style_text (self ):
193
194
da = create_test_dataarray_attrs ()
194
- text = da ._repr_html_ ()
195
- assert text .startswith ("<pre>" )
196
- assert "<xarray.DataArray 'var1'" in text
195
+ with xarray .set_options (display_style = "text" ):
196
+ text = da ._repr_html_ ()
197
+ assert text .startswith ("<pre>" )
198
+ assert "<xarray.DataArray 'var1'" in text
197
199
198
200
def test_display_dataarray_style_html (self ):
199
201
da = create_test_dataarray_attrs ()
0 commit comments