Skip to content

Commit 9cc7d4e

Browse files
committed
adds async to failing tests
1 parent 39ec4bd commit 9cc7d4e

File tree

1 file changed

+19
-15
lines changed

1 file changed

+19
-15
lines changed

tests/integration/synapseclient/models/synchronous/test_dataset.py

+19-15
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,9 @@ def folder(self) -> Folder:
7171
folder = Folder(name=str(uuid.uuid4()), description=DESCRIPTION_FOLDER)
7272
return folder
7373

74-
def test_create_empty_dataset(self, syn: Synapse, project_model: Project) -> None:
74+
async def test_create_empty_dataset(
75+
self, syn: Synapse, project_model: Project
76+
) -> None:
7577
# GIVEN an empty Dataset
7678
dataset = Dataset(
7779
name=str(uuid.uuid4()),
@@ -93,7 +95,9 @@ def test_create_empty_dataset(self, syn: Synapse, project_model: Project) -> Non
9395
assert new_dataset_instance.id == dataset.id
9496
assert new_dataset_instance.description == dataset.description
9597

96-
def test_create_dataset_with_file(self, project_model: Project, file: File) -> None:
98+
async def test_create_dataset_with_file(
99+
self, project_model: Project, file: File
100+
) -> None:
97101
# GIVEN a File on Synapse
98102
file_1 = file.store(parent=project_model)
99103

@@ -120,7 +124,7 @@ def test_create_dataset_with_file(self, project_model: Project, file: File) -> N
120124
EntityRef(id=file_1.id, version=file_1.version_number),
121125
]
122126

123-
def test_create_dataset_with_folder(
127+
async def test_create_dataset_with_folder(
124128
self, project_model: Project, folder: Folder
125129
) -> None:
126130
# GIVEN a Folder with 3 files on Synapse
@@ -153,7 +157,7 @@ def test_create_dataset_with_folder(
153157
for item in new_dataset_instance.items:
154158
assert item in expected_items
155159

156-
def test_create_dataset_with_files_and_folders(
160+
async def test_create_dataset_with_files_and_folders(
157161
self, project_model: Project, file: File, folder: Folder
158162
) -> None:
159163
# GIVEN a File and a Folder with 3 files on Synapse
@@ -190,7 +194,7 @@ def test_create_dataset_with_files_and_folders(
190194
for item in new_dataset_instance.items:
191195
assert item in expected_items
192196

193-
def test_update_dataset_attributes(
197+
async def test_update_dataset_attributes(
194198
self, syn: Synapse, project_model: Project
195199
) -> None:
196200
# GIVEN an empty Dataset
@@ -219,7 +223,7 @@ def test_update_dataset_attributes(
219223
# AND all versions should have the same id
220224
assert retrieved_dataset.id == updated_dataset.id == original_dataset.id
221225

222-
def test_query_dataset(self, project_model: Project, file: File) -> None:
226+
async def test_query_dataset(self, project_model: Project, file: File) -> None:
223227
# GIVEN a Dataset with a File
224228
file = file.store(parent=project_model)
225229
dataset = Dataset(
@@ -236,7 +240,7 @@ def test_query_dataset(self, project_model: Project, file: File) -> None:
236240
assert row["name"][0] == file.name
237241
assert row["description"][0] == file.description
238242

239-
def test_part_mask_query_everything(
243+
async def test_part_mask_query_everything(
240244
self, project_model: Project, file: File
241245
) -> None:
242246
# GIVEN a Dataset with a File
@@ -275,7 +279,7 @@ def test_part_mask_query_everything(
275279
assert results.sum_file_sizes.sum_file_size_bytes is not None
276280
assert results.last_updated_on is not None
277281

278-
def test_part_mask_query_results_only(
282+
async def test_part_mask_query_results_only(
279283
self, project_model: Project, file: File
280284
) -> None:
281285
# GIVEN a Dataset with a File
@@ -307,7 +311,7 @@ def test_part_mask_query_results_only(
307311
assert results.sum_file_sizes is None
308312
assert results.last_updated_on is None
309313

310-
def test_update_dataset_rows(
314+
async def test_update_dataset_rows(
311315
self, syn: Synapse, project_model: Project, file: File
312316
) -> None:
313317
# GIVEN a Dataset with a File and a custom column
@@ -343,7 +347,7 @@ def test_update_dataset_rows(
343347
# THEN the dataset row should be updated
344348
assert row["my_annotation"][0] == "good data"
345349

346-
def test_update_dataset_remove_item(
350+
async def test_update_dataset_remove_item(
347351
self,
348352
project_model: Project,
349353
) -> None:
@@ -376,7 +380,7 @@ def test_update_dataset_remove_item(
376380
EntityRef(id=files[2].id, version=files[2].version_number) in dataset.items
377381
)
378382

379-
def test_delete_dataset(self, syn: Synapse, project_model: Project) -> None:
383+
async def test_delete_dataset(self, syn: Synapse, project_model: Project) -> None:
380384
# GIVEN an empty Dataset
381385
dataset = Dataset(
382386
name=str(uuid.uuid4()),
@@ -402,7 +406,7 @@ def init(self, syn: Synapse, schedule_for_cleanup: Callable[..., None]) -> None:
402406
self.syn = syn
403407
self.schedule_for_cleanup = schedule_for_cleanup
404408

405-
def test_add_column(
409+
async def test_add_column(
406410
self,
407411
syn: Synapse,
408412
project_model: Project,
@@ -423,7 +427,7 @@ def test_add_column(
423427
# THEN the dataset should have the new column
424428
assert "my_annotation" in dataset.columns
425429

426-
def test_delete_column(self, project_model: Project) -> None:
430+
async def test_delete_column(self, project_model: Project) -> None:
427431
# GIVEN a Dataset in Synapse
428432
dataset_name = str(uuid.uuid4())
429433
old_column_name = "column_string"
@@ -463,7 +467,7 @@ def test_delete_column(self, project_model: Project) -> None:
463467
assert column_to_keep in new_dataset_instance.columns
464468
assert len(new_dataset_instance.columns.values()) == 1
465469

466-
def test_reorder_column(self, project_model: Project) -> None:
470+
async def test_reorder_column(self, project_model: Project) -> None:
467471
# GIVEN a Dataset in Synapse
468472
dataset_name = str(uuid.uuid4())
469473
first_column_name = "first"
@@ -493,7 +497,7 @@ def test_reorder_column(self, project_model: Project) -> None:
493497
first_column_name,
494498
]
495499

496-
def test_rename_column(self, project_model: Project) -> None:
500+
async def test_rename_column(self, project_model: Project) -> None:
497501
# GIVEN a dataset in Synapse
498502
dataset_name = str(uuid.uuid4())
499503
old_column_name = "column_string"

0 commit comments

Comments
 (0)