From 7712ae3cc9a44315970eb0ff8b1bd21e9bef6922 Mon Sep 17 00:00:00 2001 From: Lennart Purucker Date: Thu, 4 Jan 2024 21:21:31 +0100 Subject: [PATCH] rework tagging test adjusted for new server specification --- tests/test_datasets/test_dataset.py | 2 +- tests/test_flows/test_flow.py | 2 +- tests/test_runs/test_run.py | 2 +- tests/test_tasks/test_task_methods.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_datasets/test_dataset.py b/tests/test_datasets/test_dataset.py index 93e0247d2..40942e62a 100644 --- a/tests/test_datasets/test_dataset.py +++ b/tests/test_datasets/test_dataset.py @@ -301,7 +301,7 @@ def setUp(self): self.dataset = openml.datasets.get_dataset(125, download_data=False) def test_tagging(self): - tag = "testing_tag_{}_{}".format(self.id(), time()) + tag = "test_tag_OpenMLDatasetTestOnTestServer_{}".format(time()) datasets = openml.datasets.list_datasets(tag=tag, output_format="dataframe") self.assertTrue(datasets.empty) self.dataset.push_tag(tag) diff --git a/tests/test_flows/test_flow.py b/tests/test_flows/test_flow.py index 13ca11fc7..fe19724d3 100644 --- a/tests/test_flows/test_flow.py +++ b/tests/test_flows/test_flow.py @@ -102,7 +102,7 @@ def test_tagging(self): flows = openml.flows.list_flows(size=1, output_format="dataframe") flow_id = flows["id"].iloc[0] flow = openml.flows.get_flow(flow_id) - tag = "testing_tag_{}_{}".format(self.id(), time.time()) + tag = "test_tag_TestFlow_{}".format(time.time()) flows = openml.flows.list_flows(tag=tag, output_format="dataframe") self.assertEqual(len(flows), 0) flow.push_tag(tag) diff --git a/tests/test_runs/test_run.py b/tests/test_runs/test_run.py index 0396d0f19..3a4c97998 100644 --- a/tests/test_runs/test_run.py +++ b/tests/test_runs/test_run.py @@ -30,7 +30,7 @@ def test_tagging(self): assert not runs.empty, "Test server state is incorrect" run_id = runs["run_id"].iloc[0] run = openml.runs.get_run(run_id) - tag = "testing_tag_{}_{}".format(self.id(), time()) + tag = "test_tag_TestRun_{}".format(time()) runs = openml.runs.list_runs(tag=tag, output_format="dataframe") self.assertEqual(len(runs), 0) run.push_tag(tag) diff --git a/tests/test_tasks/test_task_methods.py b/tests/test_tasks/test_task_methods.py index 4f15ccce2..cc64f322c 100644 --- a/tests/test_tasks/test_task_methods.py +++ b/tests/test_tasks/test_task_methods.py @@ -16,7 +16,7 @@ def tearDown(self): def test_tagging(self): task = openml.tasks.get_task(1) # anneal; crossvalidation - tag = "testing_tag_{}_{}".format(self.id(), time()) + tag = "test_tag_OpenMLTaskMethodsTest_{}".format(time()) tasks = openml.tasks.list_tasks(tag=tag, output_format="dataframe") self.assertEqual(len(tasks), 0) task.push_tag(tag)