Skip to content

Commit

Permalink
Set default value as object() instead of None
Browse files Browse the repository at this point in the history
  • Loading branch information
pnijhara committed May 13, 2020
1 parent 0063d2c commit 6ba6bc8
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions xarray/tests/test_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
dask_version = "10.0"

ON_WINDOWS = sys.platform == "win32"
default_value = object()


def open_example_dataset(name, *args, **kwargs):
Expand Down Expand Up @@ -3604,14 +3605,14 @@ def create_tmp_geotiff(
ny=3,
nz=3,
transform=None,
transform_args=None,
crs=None,
transform_args=default_value,
crs=default_value,
open_kwargs=None,
additional_attrs=None,
):
if transform_args is None:
if transform_args is default_value:
transform_args = [5000, 80000, 1000, 2000.0]
if crs is None:
if crs is default_value:
crs = {"units": "m", "no_defs": True, "ellps": "WGS84", "proj": "utm", "zone": 18}
# yields a temporary geotiff file and a corresponding expected DataArray
import rasterio
Expand Down

0 comments on commit 6ba6bc8

Please sign in to comment.