Skip to content

Commit b3c3415

Browse files
committed
Adding unit test
1 parent 52be544 commit b3c3415

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

openml/evaluations/functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ def __list_evaluations(api_call, output_format='object'):
202202
return evals
203203

204204

205-
def list_evaluation_measures() -> list:
205+
def list_evaluation_measures() -> List[str]:
206206
""" Return list of evaluation measures available.
207207
208208
The function performs an API call to retrieve the entire list of

tests/test_evaluations/test_evaluation_functions.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,8 @@ def test_evaluation_list_per_fold(self):
116116
for run_id in evaluations.keys():
117117
self.assertIsNotNone(evaluations[run_id].value)
118118
self.assertIsNone(evaluations[run_id].values)
119+
120+
def test_list_evaluation_measures(self):
121+
measures = openml.evaluations.list_evaluation_measures()
122+
self.assertEqual([isinstance(measures), list)
123+
self.assertEqual(all([isinstance(s, str) for s in measures]), True)

0 commit comments

Comments
 (0)