Skip to content

Commit

Permalink
Add funny test
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed May 28, 2020
1 parent 6383a0b commit 8261ee6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions xarray/tests/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2566,6 +2566,13 @@ def test_rename_to_dim_name(self):
obj = ds.reset_index("coord_1").rename({"coord_1_": "coord_1"})
assert_equal(ds, obj)

newds = (
ds.reset_index("coord_1")
.reset_coords("coord_1_")
.rename({"coord_1_": "coord_1"})
)
assert "coord_1" not in newds.data_vars

def test_rename_multiindex(self):
mindex = pd.MultiIndex.from_tuples(
[([1, 2]), ([3, 4])], names=["level0", "level1"]
Expand Down

0 comments on commit 8261ee6

Please sign in to comment.