Skip to content

Commit 6b081c5

Browse files
joaquinvanschorenmfeurer
authored andcommitted
added unit test for new studies (#649)
1 parent 5123588 commit 6b081c5

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

tests/test_study/test_study_functions.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,17 @@ def test_get_tasks(self):
2929
self.assertIsNone(study.setups)
3030
self.assertIsNone(study.runs)
3131

32+
def test_get_tasks_new_studies(self):
33+
study_id = 99
34+
35+
study = openml.study.get_study(study_id, 'tasks')
36+
self.assertGreater(len(study.data), 0)
37+
self.assertGreaterEqual(len(study.tasks), len(study.data))
38+
# other entities should be None because of the tasks filter
39+
self.assertIsNone(study.flows)
40+
self.assertIsNone(study.setups)
41+
self.assertIsNone(study.runs)
42+
3243
def test_publish_benchmark_suite(self):
3344
fixture_alias = None
3445
fixture_name = 'unit tested benchmark suite'

0 commit comments

Comments
 (0)