# Path: graphscale/utils.py
# async def async_list(coros: List[Awaitable[T]]) -> List[T]:
#     """Use to await a list and return a list.
#     Example: list_of_results = await async_list(list_of_gens)
#     """
#     return await asyncio.gather(*coros)


import asyncio
import pytest
from typing import List
from aiodataloader import DataLoader
from graphscale.utils import async_list



pytestmark = pytest.mark.asyncio


class StringLoader(DataLoader):
    def __init__(self) -> None:
        super().__init__(batch_load_fn=self._batch_load_fn)
        self.calls = []  # type: List[List[int]]

    async def _batch_load_fn(self, keys: List[int]) -> List[str]:
        self.calls.append(keys)
        return [str(key) for key in keys]



# Path: graphscale/utils.py
# async def async_list(coros: List[Awaitable[T]]) -> List[T]:
#     """Use to await a list and return a list.
#     Example: list_of_results = await async_list(list_of_gens)
#     """
#     return await asyncio.gather(*coros)


# Path: tests/test_aiodataloader.py
import asyncio
import pytest
from typing import List
from aiodataloader import DataLoader
from graphscale.utils import async_list




pytestmark = pytest.mark.asyncio


class StringLoader(DataLoader):
    def __init__(self) -> None:
        super().__init__(batch_load_fn=self._batch_load_fn)
        self.calls = []  # type: List[List[int]]

    async def _batch_load_fn(self, keys: List[int]) -> List[str]:
        self.calls.append(keys)
        return [str(key) for key in keys]



async def test_aiodataloader_singleload() -> None: