@@ -156,35 +156,35 @@ def test_get_task(self):
156156 task = openml .tasks .get_task (1 , download_data = True ) # anneal; crossvalidation
157157 assert isinstance (task , OpenMLTask )
158158 assert os .path .exists (
159- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "1" , "task.xml" )
159+ os .path .join (openml . config . get_cache_directory () , "tasks" , "1" , "task.xml" )
160160 )
161161 assert not os .path .exists (
162- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "1" , "datasplits.arff" )
162+ os .path .join (openml . config . get_cache_directory () , "tasks" , "1" , "datasplits.arff" )
163163 )
164164 assert os .path .exists (
165- os .path .join (self . workdir , "org" , "openml" , "test" , " datasets" , "1" , "dataset.arff " )
165+ os .path .join (openml . config . get_cache_directory () , "datasets" , "1" , "dataset_1.pq " )
166166 )
167167
168168 @pytest .mark .uses_test_server ()
169169 def test_get_task_lazy (self ):
170170 task = openml .tasks .get_task (2 , download_data = False ) # anneal; crossvalidation
171171 assert isinstance (task , OpenMLTask )
172172 assert os .path .exists (
173- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "2" , "task.xml" )
173+ os .path .join (openml . config . get_cache_directory () , "tasks" , "2" , "task.xml" )
174174 )
175175 assert task .class_labels == ["1" , "2" , "3" , "4" , "5" , "U" ]
176176
177177 assert not os .path .exists (
178- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "2" , "datasplits.arff" )
178+ os .path .join (openml . config . get_cache_directory () , "tasks" , "2" , "datasplits.arff" )
179179 )
180180 # Since the download_data=False is propagated to get_dataset
181181 assert not os .path .exists (
182- os .path .join (self . workdir , "org" , " openml" , "test" , "datasets" , "2" , "dataset.arff" )
182+ os .path .join (openml . config . get_cache_directory () , "datasets" , "2" , "dataset.arff" )
183183 )
184184
185185 task .download_split ()
186186 assert os .path .exists (
187- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "2" , "datasplits.arff" )
187+ os .path .join (openml . config . get_cache_directory () , "tasks" , "2" , "datasplits.arff" )
188188 )
189189
190190 @mock .patch ("openml.tasks.functions.get_dataset" )
@@ -228,7 +228,7 @@ def test_download_split(self):
228228 split = task .download_split ()
229229 assert type (split ) == OpenMLSplit
230230 assert os .path .exists (
231- os .path .join (self . workdir , "org" , " openml" , "test" , "tasks" , "1" , "datasplits.arff" )
231+ os .path .join (openml . config . get_cache_directory () , "tasks" , "1" , "datasplits.arff" )
232232 )
233233
234234 def test_deletion_of_cache_dir (self ):
0 commit comments