Skip to content

Commit

Permalink
test: rename two tests for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-reimann committed Mar 30, 2023
1 parent 1b5a4cc commit a624465
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/safeds/ml/classification/test_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def test_should_raise_on_invalid_data(self, classifier: Classifier, invalid_data
ids=lambda x: x.__class__.__name__
)
class TestPredict:
def test_should_include_features_of_prediction_input(self, classifier: Classifier, valid_data: TaggedTable) -> None:
def test_should_include_features_of_input_table(self, classifier: Classifier, valid_data: TaggedTable) -> None:
fitted_classifier = classifier.fit(valid_data)
prediction = fitted_classifier.predict(valid_data.features)
assert prediction.features == valid_data.features

def test_should_include_complete_prediction_input(self, classifier: Classifier, valid_data: TaggedTable) -> None:
def test_should_include_complete_input_table(self, classifier: Classifier, valid_data: TaggedTable) -> None:
fitted_regressor = classifier.fit(valid_data)
prediction = fitted_regressor.predict(valid_data.remove_columns(["target"]))
assert prediction.remove_columns(["target"]) == valid_data.remove_columns(["target"])
Expand Down
4 changes: 2 additions & 2 deletions tests/safeds/ml/regression/test_regressor.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,12 @@ def test_should_raise_on_invalid_data(self, regressor: Regressor, invalid_data:
ids=lambda x: x.__class__.__name__
)
class TestPredict:
def test_should_include_features_of_prediction_input(self, regressor: Regressor, valid_data: TaggedTable) -> None:
def test_should_include_features_of_input_table(self, regressor: Regressor, valid_data: TaggedTable) -> None:
fitted_regressor = regressor.fit(valid_data)
prediction = fitted_regressor.predict(valid_data.features)
assert prediction.features == valid_data.features

def test_should_include_complete_prediction_input(self, regressor: Regressor, valid_data: TaggedTable) -> None:
def test_should_include_complete_input_table(self, regressor: Regressor, valid_data: TaggedTable) -> None:
fitted_regressor = regressor.fit(valid_data)
prediction = fitted_regressor.predict(valid_data.remove_columns(["target"]))
assert prediction.remove_columns(["target"]) == valid_data.remove_columns(["target"])
Expand Down

0 comments on commit a624465

Please sign in to comment.