Skip to content

Commit

Permalink
rework tagging test adjusted for new server specification
Browse files Browse the repository at this point in the history
  • Loading branch information
LennartPurucker committed Jan 4, 2024
1 parent a7bcf07 commit 7712ae3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/test_datasets/test_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_flows/test_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_runs/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion tests/test_tasks/test_task_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7712ae3

Please sign in to comment.