From 607bc2d8aaee8ca463119fa7cf9a38920ef1b622 Mon Sep 17 00:00:00 2001 From: JoaquinVanschoren Date: Tue, 19 Mar 2019 10:43:01 +0100 Subject: [PATCH] added unit test for new studies --- tests/test_study/test_study_functions.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/test_study/test_study_functions.py b/tests/test_study/test_study_functions.py index 9a91beb61e..2a5e72ad94 100644 --- a/tests/test_study/test_study_functions.py +++ b/tests/test_study/test_study_functions.py @@ -29,6 +29,17 @@ def test_get_tasks(self): self.assertIsNone(study.setups) self.assertIsNone(study.runs) + def test_get_tasks_new_studies(self): + study_id = 99 + + study = openml.study.get_study(study_id, 'tasks') + self.assertGreater(len(study.data), 0) + self.assertGreaterEqual(len(study.tasks), len(study.data)) + # other entities should be None because of the tasks filter + self.assertIsNone(study.flows) + self.assertIsNone(study.setups) + self.assertIsNone(study.runs) + def test_publish_benchmark_suite(self): fixture_alias = None fixture_name = 'unit tested benchmark suite'