From 1a51d1e432f8807bd1b986a14b76043e29900ef9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Manuel=20Dom=C3=ADnguez?= Date: Mon, 16 Dec 2024 08:37:59 +0100 Subject: [PATCH] Revert "Mark tests using `assert_list_names` as async" This reverts commit a05d5cc5ec53dcf8d696c51b47ca320eb8071c6f. --- test/unit/files/test_temp.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/unit/files/test_temp.py b/test/unit/files/test_temp.py index 1ec381926498..eae44e90c57b 100644 --- a/test/unit/files/test_temp.py +++ b/test/unit/files/test_temp.py @@ -46,16 +46,14 @@ def test_file_source(file_sources: TestConfiguredFileSources): assert_realizes_contains(file_sources, f"{ROOT_URI}/dir1/sub1/f", "f") -@pytest.mark.asyncio -async def test_list(temp_file_source: TempFilesSource): - await assert_list_names(temp_file_source, "/", recursive=False, expected_names=["a", "b", "c", "dir1"]) - await assert_list_names(temp_file_source, "/dir1", recursive=False, expected_names=["d", "e", "sub1"]) +def test_list(temp_file_source: TempFilesSource): + assert_list_names(temp_file_source, "/", recursive=False, expected_names=["a", "b", "c", "dir1"]) + assert_list_names(temp_file_source, "/dir1", recursive=False, expected_names=["d", "e", "sub1"]) -@pytest.mark.asyncio -async def test_list_recursive(temp_file_source: TempFilesSource): +def test_list_recursive(temp_file_source: TempFilesSource): expected_names = ["a", "b", "c", "dir1", "d", "e", "sub1", "f"] - await assert_list_names(temp_file_source, "/", recursive=True, expected_names=expected_names) + assert_list_names(temp_file_source, "/", recursive=True, expected_names=expected_names) @pytest.mark.asyncio @@ -211,6 +209,7 @@ def _upload_to(file_source: TempFilesSource, target_uri: str, content: str, user file_source.write_from(target_uri, f.name, user_context=user_context) +@pytest.mark.asyncio async def assert_list_names(file_source: TempFilesSource, uri: str, recursive: bool, expected_names: List[str]): result, count = await file_source.list(uri, recursive=recursive) assert count == len(expected_names)