Skip to content

Commit 56895c2

Browse files
Rework Tagging Tests for New Server Specification (#1294)
* rework tagging test adjusted for new server specification * update progress.rst
1 parent 0a74d9e commit 56895c2

File tree

5 files changed

+5
-4
lines changed

5 files changed

+5
-4
lines changed

doc/progress.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ next
1212
* MAINT #1280: Use the server-provided ``parquet_url`` instead of ``minio_url`` to determine the location of the parquet file.
1313
* ADD #716: add documentation for remaining attributes of classes and functions.
1414
* ADD #1261: more annotations for type hints.
15+
* MAINT #1294: update tests to new tag specification.
1516

1617
0.14.1
1718
~~~~~~

tests/test_datasets/test_dataset.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ def setUp(self):
301301
self.dataset = openml.datasets.get_dataset(125, download_data=False)
302302

303303
def test_tagging(self):
304-
tag = "testing_tag_{}_{}".format(self.id(), time())
304+
tag = "test_tag_OpenMLDatasetTestOnTestServer_{}".format(time())
305305
datasets = openml.datasets.list_datasets(tag=tag, output_format="dataframe")
306306
self.assertTrue(datasets.empty)
307307
self.dataset.push_tag(tag)

tests/test_flows/test_flow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def test_tagging(self):
102102
flows = openml.flows.list_flows(size=1, output_format="dataframe")
103103
flow_id = flows["id"].iloc[0]
104104
flow = openml.flows.get_flow(flow_id)
105-
tag = "testing_tag_{}_{}".format(self.id(), time.time())
105+
tag = "test_tag_TestFlow_{}".format(time.time())
106106
flows = openml.flows.list_flows(tag=tag, output_format="dataframe")
107107
self.assertEqual(len(flows), 0)
108108
flow.push_tag(tag)

tests/test_runs/test_run.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ def test_tagging(self):
3030
assert not runs.empty, "Test server state is incorrect"
3131
run_id = runs["run_id"].iloc[0]
3232
run = openml.runs.get_run(run_id)
33-
tag = "testing_tag_{}_{}".format(self.id(), time())
33+
tag = "test_tag_TestRun_{}".format(time())
3434
runs = openml.runs.list_runs(tag=tag, output_format="dataframe")
3535
self.assertEqual(len(runs), 0)
3636
run.push_tag(tag)

tests/test_tasks/test_task_methods.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def tearDown(self):
1616

1717
def test_tagging(self):
1818
task = openml.tasks.get_task(1) # anneal; crossvalidation
19-
tag = "testing_tag_{}_{}".format(self.id(), time())
19+
tag = "test_tag_OpenMLTaskMethodsTest_{}".format(time())
2020
tasks = openml.tasks.list_tasks(tag=tag, output_format="dataframe")
2121
self.assertEqual(len(tasks), 0)
2222
task.push_tag(tag)

0 commit comments

Comments
 (0)