Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: added the missing ids in parameterized tests #412

Merged
merged 19 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
a2a4611
added the missing ids in parameterized tests
PhilipGutberlet Jun 30, 2023
77503d4
Merge branch 'main' into 362-missing-ids-for-parametrized-tests
PhilipGutberlet Jun 30, 2023
30f5bae
Update tests/safeds/data/tabular/transformation/test_standard_scaler.py
daniaHu Jun 30, 2023
ee2eb3c
Update tests/safeds/data/tabular/transformation/test_standard_scaler.py
daniaHu Jun 30, 2023
ccc6a44
added missing ids
PhilipGutberlet Jul 7, 2023
612a6af
Merge remote-tracking branch 'origin/362-missing-ids-for-parametrized…
PhilipGutberlet Jul 7, 2023
9748f56
Merge branch 'main' into 362-missing-ids-for-parametrized-tests
PhilipGutberlet Jul 7, 2023
26d10bb
Merge remote-tracking branch 'origin/362-missing-ids-for-parametrized…
PhilipGutberlet Jul 7, 2023
236b1c1
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
1300d66
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
1c76f39
fixed failed tests
PhilipGutberlet Jul 7, 2023
353b1b3
Merge remote-tracking branch 'origin/362-missing-ids-for-parametrized…
PhilipGutberlet Jul 7, 2023
60fa448
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
36250e4
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
5a5ac2c
fixed failed tests
PhilipGutberlet Jul 7, 2023
d17e38c
Merge branch '362-missing-ids-for-parametrized-tests' of https://gith…
PhilipGutberlet Jul 7, 2023
8d0d549
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
6cc165c
Merge branch 'main' into 362-missing-ids-for-parametrized-tests
PhilipGutberlet Jul 7, 2023
7dbfc33
style: apply automated linter fixes
megalinter-bot Jul 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions tests/safeds/data/tabular/transformation/test_imputer.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class TestStr:
(Imputer.Strategy.Median(), "Median"),
(Imputer.Strategy.Mode(), "Mode"),
],
ids=["Constant", "Mean", "Median", "Mode"],
)
def test_should_return_correct_string_representation(self, strategy: ImputerStrategy, expected: str) -> None:
assert str(strategy) == expected
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ class TestFitAndTransform:
),
),
],
ids=["no_column_names", "with_column_names"],
)
def test_should_return_transformed_table(
self,
Expand Down Expand Up @@ -205,6 +206,7 @@ class TestInverseTransform:
},
),
],
ids=["no_column_names"],
)
def test_should_return_original_table(self, table: Table) -> None:
transformer = LabelEncoder().fit(table, None)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class TestFitAndTransform:
),
),
],
ids=["one_column", "two_columns"],
)
def test_should_return_transformed_table(
self,
Expand Down Expand Up @@ -183,6 +184,7 @@ def test_should_return_transformed_table(
),
),
],
ids=["one_column", "two_columns"],
)
def test_should_return_transformed_table_with_correct_range(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ class TestFitAndTransformOnMultipleTables:
),
),
],
ids=["two columns"],
daniaHu marked this conversation as resolved.
Show resolved Hide resolved
)
def test_should_return_transformed_tables(
self,
Expand Down Expand Up @@ -224,6 +225,7 @@ class TestInverseTransform:
},
),
],
ids=["one column"],
daniaHu marked this conversation as resolved.
Show resolved Hide resolved
)
def test_should_return_original_table(self, table: Table) -> None:
transformer = StandardScaler().fit(table, None)
Expand Down
1 change: 1 addition & 0 deletions tests/safeds/ml/classical/regression/test_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ class TestMeanSquaredError:
@pytest.mark.parametrize(
("predicted", "expected", "result"),
[([1, 2], [1, 2], 0), ([0, 0], [1, 1], 1), ([1, 1, 1], [2, 2, 11], 34)],
ids=["perfect_prediction", "bad_prediction", "worst_prediction"],
)
def test_valid_data(self, predicted: list[float], expected: list[float], result: float) -> None:
table = Table({"predicted": predicted, "expected": expected}).tag_columns(
Expand Down