File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -74,11 +74,16 @@ def var():
7474 ],
7575)
7676def test_as_compatible_data_writeable (data ):
77- pd .set_option ("mode.copy_on_write" , True )
77+ # In pandas 3 the mode.copy_on_write option defaults to True, so the option
78+ # setting logic can be removed once our minimum version of pandas is
79+ # greater than or equal to 3.
80+ if not has_pandas_3 :
81+ pd .set_option ("mode.copy_on_write" , True )
7882 # GH8843, ensure writeable arrays for data_vars even with
7983 # pandas copy-on-write mode
8084 assert as_compatible_data (data ).flags .writeable
81- pd .reset_option ("mode.copy_on_write" )
85+ if not has_pandas_3 :
86+ pd .reset_option ("mode.copy_on_write" )
8287
8388
8489class VariableSubclassobjects (NamedArraySubclassobjects , ABC ):
You can’t perform that action at this time.
0 commit comments