Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed May 5, 2023
1 parent df224ea commit dd891c1
Showing 1 changed file with 23 additions and 23 deletions.
46 changes: 23 additions & 23 deletions tests/test_saferandomforestclassifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ def test_randomforest_hacked_postfit():
part2 = get_reporting_string(
name="param_changed_from_to", key="bootstrap", val=False, cur_val=True
)
part3 = ""#get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
part3 = "" # get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
correct_msg2 = part1 + part2 + part3
# print(f'Correct: {correct_msg2}\n Actual: {msg2}')

Expand Down Expand Up @@ -197,11 +197,11 @@ def test_randomforest_modeltype_changed():
# correct_msg += get_reporting_string(name="basic_params_differ",length=1)
correct_msg = get_reporting_string(name="forest_estimators_differ", idx=5)
correct_msg += get_reporting_string(
name="param_changed_from_to",
key="base_estimator",
val="DecisionTreeClassifier()",
cur_val="DummyClassifier()",
)
name="param_changed_from_to",
key="base_estimator",
val="DecisionTreeClassifier()",
cur_val="DummyClassifier()",
)
# correct_msg += ("structure base_estimator has 1 differences: [('change', '', "
# "(DecisionTreeClassifier(), DecisionTreeClassifier()))]"
# )
Expand Down Expand Up @@ -267,12 +267,12 @@ def test_randomforest_hacked_postfit_trees_swapped():
name="param_changed_from_to", key="max_depth", val="None", cur_val="2"
)
part3 = get_reporting_string(name="forest_estimators_differ", idx=5)
part4 = ""#get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
part4 = "" # get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
correct_msg = part1 + part2 + part3 + part4
# print(f'Correct:\n{correct_msg} Actual:\n{msg}')
assert msg == correct_msg, f"{msg}\n should be {correct_msg}"
Expand All @@ -298,12 +298,12 @@ def test_randomforest_hacked_postfit_moretrees():
name="param_changed_from_to", key="n_estimators", val="5", cur_val="10"
)
part3 = get_reporting_string(name="different_num_estimators", num1=10, num2=5)
part4 = ""#get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
part4 = "" # get_reporting_string(
# name="param_changed_from_to",
# key="base_estimator",
# val="DecisionTreeClassifier()",
# cur_val="DecisionTreeClassifier()",
# )
correct_msg = part1 + part2 + part3 + part4
# print(f'Correct:\n{correct_msg} Actual:\n{msg}')
assert msg == correct_msg, f"{msg}\n should be {correct_msg}"
Expand Down

0 comments on commit dd891c1

Please sign in to comment.