Skip to content

Commit 1480cf7

Browse files
committed
refactor(api)!: remove deprecated Table.relabel method
1 parent cd7c1b6 commit 1480cf7

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

ibis/tests/expr/test_table.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -406,32 +406,6 @@ def test_filter_fusion_distinct_table_objects(con):
406406
assert_equal(expr, expr4)
407407

408408

409-
def test_relabel():
410-
table = api.table({"x": "int32", "y": "string", "z": "double"})
411-
412-
# Using a mapping
413-
with pytest.warns(FutureWarning, match="Table.rename"):
414-
res = table.relabel({"x": "x_1", "y": "y_1"}).schema()
415-
sol = sch.schema({"x_1": "int32", "y_1": "string", "z": "double"})
416-
assert_equal(res, sol)
417-
418-
# Using a function
419-
with pytest.warns(FutureWarning, match="Table.rename"):
420-
res = table.relabel(lambda x: None if x == "z" else f"{x}_1").schema()
421-
assert_equal(res, sol)
422-
423-
# Using a format string
424-
with pytest.warns(FutureWarning, match="Table.rename"):
425-
res = table.relabel("_{name}_")
426-
sol = table.relabel({"x": "_x_", "y": "_y_", "z": "_z_"})
427-
assert_equal(res, sol)
428-
429-
# Mapping with unknown columns errors
430-
with pytest.raises(com.IbisTypeError, match="'missing' is not found in table"):
431-
with pytest.warns(FutureWarning, match="Table.rename"):
432-
table.relabel({"missing": "oops"})
433-
434-
435409
def test_rename():
436410
table = api.table({"x": "int32", "y": "string", "z": "double"})
437411
sol = sch.schema({"x_1": "int32", "y_1": "string", "z": "double"})

0 commit comments

Comments
 (0)