From 507b1f6fbd42c29cd6d7334c1ca268cdde152494 Mon Sep 17 00:00:00 2001 From: dcherian Date: Tue, 29 Oct 2019 09:34:47 -0600 Subject: [PATCH] Fix window test --- doc/whats-new.rst | 2 +- xarray/tests/test_dask.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/whats-new.rst b/doc/whats-new.rst index 5f1eef09847..7c437d809a2 100644 --- a/doc/whats-new.rst +++ b/doc/whats-new.rst @@ -61,7 +61,7 @@ Internal Changes - Use Python 3.6 idioms throughout the codebase. (:pull:3419) By `Maximilian Roos `_ - Implement :py:func:`__dask_tokenize__` for xarray objects. - By `Deepak Cherian `_ + By `Deepak Cherian `_ and `Guido Imperiale `_. .. _whats-new.0.14.0: diff --git a/xarray/tests/test_dask.py b/xarray/tests/test_dask.py index 091a63f471d..8b2c2703f0d 100644 --- a/xarray/tests/test_dask.py +++ b/xarray/tests/test_dask.py @@ -1,5 +1,6 @@ import operator import pickle +import sys from contextlib import suppress from distutils.version import LooseVersion from textwrap import dedent @@ -28,6 +29,8 @@ da = pytest.importorskip("dask.array") dd = pytest.importorskip("dask.dataframe") +ON_WINDOWS = sys.platform == "win32" + class CountingScheduler: """ Simple dask scheduler counting the number of computes. @@ -1186,7 +1189,7 @@ def test_normalize_token_identical(obj, transform): def test_normalize_token_netcdf_backend(map_ds): - with create_tmp_file() as tmp_file: + with create_tmp_file(allow_cleanup_failure=ON_WINDOWS) as tmp_file: map_ds.to_netcdf(tmp_file) read = xr.open_dataset(tmp_file) assert not dask.base.tokenize(map_ds) == dask.base.tokenize(read)