diff --git a/pyproject.toml b/pyproject.toml index 57d3965..34b5714 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,6 @@ version = {attr = "duckduckgo_search.version.__version__"} dev = [ "ruff>=0.1.6", "pytest>=7.4.2", - "pytest-asyncio==0.21.1", ] [tool.ruff] diff --git a/requirements-dev.txt b/requirements-dev.txt index 62f26ea..d72cf46 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,3 +1,2 @@ ruff>=0.1.6 pytest>=7.4.2 -pytest-asyncio==0.21.1 diff --git a/tests/test_duckduckgo_search_async.py b/tests/test_duckduckgo_search_async.py deleted file mode 100644 index a92f0db..0000000 --- a/tests/test_duckduckgo_search_async.py +++ /dev/null @@ -1,83 +0,0 @@ -import pytest - -from duckduckgo_search import AsyncDDGS - - -@pytest.mark.asyncio -async def test_text(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.text("cat", max_results=30)] - assert len(results) == 30 - - -@pytest.mark.asyncio -async def test_text_params(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.text("cat", safesearch="off", timelimit="m", max_results=30)] - assert len(results) == 30 - - -@pytest.mark.asyncio -async def test_text_html(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.text("eagle", backend="html", max_results=30)] - assert len(results) == 30 - - -@pytest.mark.asyncio -async def test_text_lite(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.text("dog", backend="lite", max_results=30)] - assert len(results) == 30 - - -@pytest.mark.asyncio -async def test_images(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.images("airplane", max_results=140)] - assert len(results) == 140 - - -@pytest.mark.asyncio -async def test_videos(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.videos("sea", max_results=40)] - assert len(results) == 40 - - -@pytest.mark.asyncio -async def test_news(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.news("tesla", max_results=27)] - assert len(results) == 27 - - -@pytest.mark.asyncio -async def test_maps(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.maps("school", place="London", max_results=30)] - assert len(results) == 30 - - -@pytest.mark.asyncio -async def test_answers(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.answers("sun")] - assert len(results) >= 1 - - -@pytest.mark.asyncio -async def test_suggestions(): - async with AsyncDDGS() as ddgs: - results = [x async for x in ddgs.suggestions("moon")] - assert len(results) >= 1 - - -@pytest.mark.asyncio -async def test_translate(): - results = await AsyncDDGS().translate("school", to="de") - assert results == { - "detected_language": "en", - "translated": "Schule", - "original": "school", - }