Skip to content

Commit 42b9668

Browse files
committed
fix unit tests
1 parent 7db4c70 commit 42b9668

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

openml/study/study.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ def publish(self):
8383
file_elements = {
8484
'description': self._to_xml()
8585
}
86-
8786
return_value = openml._api_calls._perform_api_call(
8887
"study/",
8988
'post',

tests/test_study/test_study_functions.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ def test_get_study(self):
1818
self.assertEqual(len(study.setups), 30)
1919

2020
def test_get_tasks(self):
21-
study_id = 14
21+
study_id = 1
2222

2323
study = openml.study.get_study(study_id, 'tasks')
24-
self.assertGreater(len(study.tasks), 0)
24+
self.assertGreater(len(study.data), 0)
25+
self.assertGreaterEqual(len(study.tasks), len(study.data))
2526
# note that other entities are None, even though this study has
2627
# datasets
27-
self.assertIsNone(study.data)
2828
self.assertIsNone(study.flows)
2929
self.assertIsNone(study.setups)
3030
self.assertIsNone(study.runs)

tests/test_tasks/test_task_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ def test_list_tasks_empty(self):
7373

7474
def test_list_tasks_by_tag(self):
7575
num_basic_tasks = 100 # number is flexible, check server if fails
76-
tasks = openml.tasks.list_tasks(tag='study_14')
76+
tasks = openml.tasks.list_tasks(tag='OpenML100')
7777
self.assertGreaterEqual(len(tasks), num_basic_tasks)
7878
for tid in tasks:
7979
self._check_task(tasks[tid])

0 commit comments

Comments
 (0)