Skip to content

Commit 8261ee6

Browse files
committed
Add funny test
1 parent 6383a0b commit 8261ee6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

xarray/tests/test_dataset.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2566,6 +2566,13 @@ def test_rename_to_dim_name(self):
25662566
obj = ds.reset_index("coord_1").rename({"coord_1_": "coord_1"})
25672567
assert_equal(ds, obj)
25682568

2569+
newds = (
2570+
ds.reset_index("coord_1")
2571+
.reset_coords("coord_1_")
2572+
.rename({"coord_1_": "coord_1"})
2573+
)
2574+
assert "coord_1" not in newds.data_vars
2575+
25692576
def test_rename_multiindex(self):
25702577
mindex = pd.MultiIndex.from_tuples(
25712578
[([1, 2]), ([3, 4])], names=["level0", "level1"]

0 commit comments

Comments
 (0)