Results of 1 - 2 of about 2 for anyio (0.004 sec.)
- Async Tests 11228
- Async Tests Warning The current page still doesn't have a translation for this language. But you can help translating it: Contributing . You have already seen how to test your FastAPI applications using the provided TestClient . Up to now,
...correct data in the database, while using an async database library. Let's look at how we can make that work. pytest.mark.anyio If we want to call asynchronous functions in our tests, our test functions have to be asynchronous. AnyIO provides a neat...e this now: Python 3.8+ import pytest from httpx import ASGITransport , AsyncClient from .main import app @pytest . mark . anyio async def test_root (): async with AsyncClient ( transport = ASGITransport ( app = app ), base_url = "http://test" ) as ac...{ "message" : "Tomato" } Run it You can run your tests as usual via: $ pytest ---> 100% In Detail The marker @pytest.mark.anyio tells pytest that this test function should be called asynchronously: Python 3.8+ import pytest from httpx import ASGITran... - https://man.mtool.work/fastapi/0.115/advanced/async-tests/
- Release Notes 7485
- Release Notes Latest Changes 0.115.11 Fixes ? Add docs examples and tests (support) for Annotated custom validations, like AfterValidator , revert #13440 . PR #13442 by @tiangolo . New docs: Query Parameters and String Validations - Custom
...ger-applications.md . PR #13154 by @alv2017 . Internal ⬆️ Add support for Python 3.13. PR #13274 by @tiangolo . ⬆️ Upgrade AnyIO max version for tests, new range: >=3.2.1,<5.0.0 . PR #13273 by @tiangolo . ? Update Sponsors badges. PR #13271 by @tiango...⬆️ Upgrade Starlette to >=0.29.0,<0.33.0 , update docs and usage of templates with new Starlette arguments. Remove pin of AnyIO >=3.7.1,<4.0.0 , add support for AnyIO 4.x.x. PR #10846 by @tiangolo . 0.107.0 Upgrades ⬆️ Upgrade Starlette to 0.28.0. PR...onsors, remove Svix. PR #10228 by @tiangolo . ? Update sponsors, add Bump.sh. PR #10227 by @tiangolo . 0.103.1 Fixes ? Pin AnyIO to < 4.0.0 to handle an incompatibility while upgrading to Starlette 0.31.1. PR #10194 by @tiangolo . Docs ✏️ Fix validati... - https://man.mtool.work/fastapi/0.115/release-notes/
PREV
1
NEXT