Skip to content

Commit

Permalink
test: original column is not changed
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed May 6, 2023
1 parent 5db22ad commit 726cbea
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/safeds/data/tabular/containers/_column/test_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,16 @@
)
def test_should_transform_column(column: Column, expected: Column) -> None:
assert column.transform(lambda it: it + 1) == expected

@pytest.mark.parametrize(
("column", "original"),
[
(Column("test", []), Column("test", [])),
(Column("test", [1, 2]), Column("test", [1, 2])),
(Column("test", [-0.5, 0, 4]), Column("test", [-0.5, 0, 4])),
],
ids=["empty", "integers", "floats"],
)
def test_should_not_change_original_column(column: Column, original: Column) -> None:
column.transform(lambda it: it + 1)
assert column == original

0 comments on commit 726cbea

Please sign in to comment.