Navigation Menu

Skip to content

Commit

Permalink
Adding test to check that get_objectives throws a type error when Non…
Browse files Browse the repository at this point in the history
…e is passed in.
  • Loading branch information
freddyaboulton committed Aug 31, 2020
1 parent 96a4a8f commit f8bc150
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions evalml/tests/objective_tests/test_objectives.py
Expand Up @@ -69,6 +69,11 @@ def test_get_objective_return_instance_does_not_work_for_some_objectives():
get_objective("Cost Benefit Matrix", return_instance=True)


def test_get_objective_does_not_work_for_none_type():
with pytest.raises(TypeError, match="Objective parameter cannot be NoneType"):
get_objective(None)


def test_get_objectives_types():

assert len(get_objectives(ProblemTypes.MULTICLASS)) == 16
Expand Down

0 comments on commit f8bc150

Please sign in to comment.