Skip to content

Commit 16699e6

Browse files
committed
Update expected number to match initial server state
This means it is not reliant on the evaluation engine processing the dataset. Interestingly, the database state purposely seems to keep the last task's dataset in preparation explicitly (by having processing marked as done but having to dataset_status entry).
1 parent d862be2 commit 16699e6

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_tasks/test_task_functions.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,9 @@ def test_list_tasks_empty(self):
9696

9797
@pytest.mark.uses_test_server()
9898
def test_list_tasks_by_tag(self):
99-
num_basic_tasks = 100 # number is flexible, check server if fails
99+
# Server starts with 99 active tasks with the tag, and one 'in_preparation',
100+
# so depending on the processing of the last dataset, there may be 99 or 100 matches.
101+
num_basic_tasks = 99
100102
tasks = openml.tasks.list_tasks(tag="OpenML100")
101103
assert len(tasks) >= num_basic_tasks
102104
for task in tasks.to_dict(orient="index").values():

0 commit comments

Comments
 (0)