22from __future__ import annotations
33
44import pandas as pd
5+ import pytest
56
67from openml .tasks import TaskType , get_task
78
@@ -17,14 +18,6 @@ def setUp(self, n_levels: int = 1):
1718 self .task_type = TaskType .SUPERVISED_CLASSIFICATION
1819 self .estimation_procedure = 5
1920
20- def test_get_X_and_Y (self ):
21- X , Y = super ().test_get_X_and_Y ()
22- assert X .shape == (768 , 8 )
23- assert isinstance (X , pd .DataFrame )
24- assert Y .shape == (768 ,)
25- assert isinstance (Y , pd .Series )
26- assert pd .api .types .is_categorical_dtype (Y )
27-
2821 def test_download_task (self ):
2922 task = super ().test_download_task ()
3023 assert task .task_id == self .task_id
@@ -34,4 +27,15 @@ def test_download_task(self):
3427
3528 def test_class_labels (self ):
3629 task = get_task (self .task_id )
37- assert task .class_labels == ["tested_negative" , "tested_positive" ]
30+ assert task .class_labels == ["tested_negative" , "tested_positive" ]
31+
32+
33+ @pytest .mark .server ()
34+ def test_get_X_and_Y ():
35+ task = get_task (119 )
36+ X , Y = task .get_X_and_y ()
37+ assert X .shape == (768 , 8 )
38+ assert isinstance (X , pd .DataFrame )
39+ assert Y .shape == (768 ,)
40+ assert isinstance (Y , pd .Series )
41+ assert pd .api .types .is_categorical_dtype (Y )
0 commit comments