@@ -71,7 +71,9 @@ def folder(self) -> Folder:
71
71
folder = Folder (name = str (uuid .uuid4 ()), description = DESCRIPTION_FOLDER )
72
72
return folder
73
73
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 :
75
77
# GIVEN an empty Dataset
76
78
dataset = Dataset (
77
79
name = str (uuid .uuid4 ()),
@@ -93,7 +95,9 @@ def test_create_empty_dataset(self, syn: Synapse, project_model: Project) -> Non
93
95
assert new_dataset_instance .id == dataset .id
94
96
assert new_dataset_instance .description == dataset .description
95
97
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 :
97
101
# GIVEN a File on Synapse
98
102
file_1 = file .store (parent = project_model )
99
103
@@ -120,7 +124,7 @@ def test_create_dataset_with_file(self, project_model: Project, file: File) -> N
120
124
EntityRef (id = file_1 .id , version = file_1 .version_number ),
121
125
]
122
126
123
- def test_create_dataset_with_folder (
127
+ async def test_create_dataset_with_folder (
124
128
self , project_model : Project , folder : Folder
125
129
) -> None :
126
130
# GIVEN a Folder with 3 files on Synapse
@@ -153,7 +157,7 @@ def test_create_dataset_with_folder(
153
157
for item in new_dataset_instance .items :
154
158
assert item in expected_items
155
159
156
- def test_create_dataset_with_files_and_folders (
160
+ async def test_create_dataset_with_files_and_folders (
157
161
self , project_model : Project , file : File , folder : Folder
158
162
) -> None :
159
163
# GIVEN a File and a Folder with 3 files on Synapse
@@ -190,7 +194,7 @@ def test_create_dataset_with_files_and_folders(
190
194
for item in new_dataset_instance .items :
191
195
assert item in expected_items
192
196
193
- def test_update_dataset_attributes (
197
+ async def test_update_dataset_attributes (
194
198
self , syn : Synapse , project_model : Project
195
199
) -> None :
196
200
# GIVEN an empty Dataset
@@ -219,7 +223,7 @@ def test_update_dataset_attributes(
219
223
# AND all versions should have the same id
220
224
assert retrieved_dataset .id == updated_dataset .id == original_dataset .id
221
225
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 :
223
227
# GIVEN a Dataset with a File
224
228
file = file .store (parent = project_model )
225
229
dataset = Dataset (
@@ -236,7 +240,7 @@ def test_query_dataset(self, project_model: Project, file: File) -> None:
236
240
assert row ["name" ][0 ] == file .name
237
241
assert row ["description" ][0 ] == file .description
238
242
239
- def test_part_mask_query_everything (
243
+ async def test_part_mask_query_everything (
240
244
self , project_model : Project , file : File
241
245
) -> None :
242
246
# GIVEN a Dataset with a File
@@ -275,7 +279,7 @@ def test_part_mask_query_everything(
275
279
assert results .sum_file_sizes .sum_file_size_bytes is not None
276
280
assert results .last_updated_on is not None
277
281
278
- def test_part_mask_query_results_only (
282
+ async def test_part_mask_query_results_only (
279
283
self , project_model : Project , file : File
280
284
) -> None :
281
285
# GIVEN a Dataset with a File
@@ -307,7 +311,7 @@ def test_part_mask_query_results_only(
307
311
assert results .sum_file_sizes is None
308
312
assert results .last_updated_on is None
309
313
310
- def test_update_dataset_rows (
314
+ async def test_update_dataset_rows (
311
315
self , syn : Synapse , project_model : Project , file : File
312
316
) -> None :
313
317
# GIVEN a Dataset with a File and a custom column
@@ -343,7 +347,7 @@ def test_update_dataset_rows(
343
347
# THEN the dataset row should be updated
344
348
assert row ["my_annotation" ][0 ] == "good data"
345
349
346
- def test_update_dataset_remove_item (
350
+ async def test_update_dataset_remove_item (
347
351
self ,
348
352
project_model : Project ,
349
353
) -> None :
@@ -376,7 +380,7 @@ def test_update_dataset_remove_item(
376
380
EntityRef (id = files [2 ].id , version = files [2 ].version_number ) in dataset .items
377
381
)
378
382
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 :
380
384
# GIVEN an empty Dataset
381
385
dataset = Dataset (
382
386
name = str (uuid .uuid4 ()),
@@ -402,7 +406,7 @@ def init(self, syn: Synapse, schedule_for_cleanup: Callable[..., None]) -> None:
402
406
self .syn = syn
403
407
self .schedule_for_cleanup = schedule_for_cleanup
404
408
405
- def test_add_column (
409
+ async def test_add_column (
406
410
self ,
407
411
syn : Synapse ,
408
412
project_model : Project ,
@@ -423,7 +427,7 @@ def test_add_column(
423
427
# THEN the dataset should have the new column
424
428
assert "my_annotation" in dataset .columns
425
429
426
- def test_delete_column (self , project_model : Project ) -> None :
430
+ async def test_delete_column (self , project_model : Project ) -> None :
427
431
# GIVEN a Dataset in Synapse
428
432
dataset_name = str (uuid .uuid4 ())
429
433
old_column_name = "column_string"
@@ -463,7 +467,7 @@ def test_delete_column(self, project_model: Project) -> None:
463
467
assert column_to_keep in new_dataset_instance .columns
464
468
assert len (new_dataset_instance .columns .values ()) == 1
465
469
466
- def test_reorder_column (self , project_model : Project ) -> None :
470
+ async def test_reorder_column (self , project_model : Project ) -> None :
467
471
# GIVEN a Dataset in Synapse
468
472
dataset_name = str (uuid .uuid4 ())
469
473
first_column_name = "first"
@@ -493,7 +497,7 @@ def test_reorder_column(self, project_model: Project) -> None:
493
497
first_column_name ,
494
498
]
495
499
496
- def test_rename_column (self , project_model : Project ) -> None :
500
+ async def test_rename_column (self , project_model : Project ) -> None :
497
501
# GIVEN a dataset in Synapse
498
502
dataset_name = str (uuid .uuid4 ())
499
503
old_column_name = "column_string"
0 commit comments