Skip to content

Deprecated paths in tests #2193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2340,14 +2340,14 @@ def test_setitem_with_coords(self):
actual = ds.copy()
actual['var3'] = other
assert_identical(expected, actual)
assert 'numbers' in other # should not change other
assert 'numbers' in other.coords # should not change other

# with alignment
other = ds['var3'].isel(dim3=slice(1, -1))
other['numbers'] = ('dim3', np.arange(8))
actual = ds.copy()
actual['var3'] = other
assert 'numbers' in other # should not change other
assert 'numbers' in other.coords # should not change other
expected = ds.copy()
expected['var3'] = ds['var3'].isel(dim3=slice(1, -1))
assert_identical(expected, actual)
Expand All @@ -2358,8 +2358,8 @@ def test_setitem_with_coords(self):
other['position'] = ('dim3', np.arange(8))
actual = ds.copy()
actual['var3'] = other
assert 'position' in actual
assert 'position' in other
assert 'position' in actual.coords
assert 'position' in other.coords

# assigning a coordinate-only dataarray
actual = ds.copy()
Expand Down