Skip to content

Commit

Permalink
Rework Tagging Tests for New Server Specification (#1294)
Browse files Browse the repository at this point in the history
* rework tagging test adjusted for new server specification

* update progress.rst
  • Loading branch information
LennartPurucker authored Jan 5, 2024
1 parent 0a74d9e commit 56895c2
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions doc/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ next
* MAINT #1280: Use the server-provided ``parquet_url`` instead of ``minio_url`` to determine the location of the parquet file.
* ADD #716: add documentation for remaining attributes of classes and functions.
* ADD #1261: more annotations for type hints.
* MAINT #1294: update tests to new tag specification.

0.14.1
~~~~~~
Expand Down
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 56895c2

Please sign in to comment.