Skip to content

Commit 1602933

Browse files
Try no autouse
1 parent 9dd447f commit 1602933

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

test/conftest.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from autoPyTorch.utils.pipeline import get_dataset_requirements
2626

2727

28-
@pytest.fixture(scope="session", autouse=True)
28+
@pytest.fixture(scope="session")
2929
def callattr_ahead_of_alltests(request):
3030
"""
3131
This procedure will run at the start of the pytest session.
@@ -50,20 +50,14 @@ def callattr_ahead_of_alltests(request):
5050
3916, # kc1
5151
]
5252

53-
# Try to populate the tests 5 times
54-
patience = 5
55-
for i in range(patience):
56-
try:
57-
# Populate the cache
58-
openml.populate_cache(task_ids=tasks_used)
59-
# Also the bunch
60-
for task in tasks_used:
61-
fetch_openml(data_id=openml.tasks.get_task(task).dataset_id,
62-
return_X_y=True)
63-
break
64-
except Exception as e:
65-
if i == patience - 1:
66-
raise e
53+
# Populate the cache
54+
# This will make the test fail immediately rather than
55+
# Waiting for a openml fetch timeout
56+
openml.populate_cache(task_ids=tasks_used)
57+
# Also the bunch
58+
for task in tasks_used:
59+
fetch_openml(data_id=openml.tasks.get_task(task).dataset_id,
60+
return_X_y=True)
6761
return
6862

6963

0 commit comments

Comments
 (0)