We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 334c51b commit 5f0e251Copy full SHA for 5f0e251
xarray/tests/test_dask.py
@@ -24,8 +24,11 @@
24
25
class DaskTestCase(TestCase):
26
def assertLazyAnd(self, expected, actual, test):
27
- with dask.config.set(get=dask.get):
+
28
+ with (dask.config.set(get=dask.get) if hasattr(dask, 'config')
29
+ else dask.set_options(get=dask.get)):
30
test(actual, expected)
31
32
if isinstance(actual, Dataset):
33
for k, v in actual.variables.items():
34
if k in actual.dims:
@@ -824,7 +827,8 @@ def test_basic_compute():
824
827
dask.multiprocessing.get,
825
828
dask.local.get_sync,
826
829
None]:
- with dask.config.set(get=get):
830
+ with (dask.config.set(get=get) if hasattr(dask, 'config')
831
+ else dask.set_options(get=get)):
832
ds.compute()
833
ds.foo.compute()
834
ds.foo.variable.compute()
0 commit comments