Skip to content

Commit

Permalink
test: Add empty list testcase for replace_column (#353)
Browse files Browse the repository at this point in the history
Closes #301.

### Summary of Changes

Added a new testcase for `replace_column` to verify that the method can
handle an empty list as argument.
  • Loading branch information
zzril authored Jun 9, 2023
1 parent d50c5b5 commit 34b9593
Showing 1 changed file with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,25 @@
},
),
),
(
Table(
{
"A": [1, 2, 3],
"B": [4, 5, 6],
"C": ["a", "b", "c"],
},
),
"C",
[],
Table(
{
"A": [1, 2, 3],
"B": [4, 5, 6],
},
),
),
],
ids=["multiple Columns", "one Column"],
ids=["multiple Columns", "one Column", "empty"],
)
def test_should_replace_column(table: Table, column_name: str, columns: list[Column], expected: Table) -> None:
result = table.replace_column(column_name, columns)
Expand Down

0 comments on commit 34b9593

Please sign in to comment.