Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for cm (0.01 sec)

  1. fastapi/concurrency.py

        try:
            yield await run_in_threadpool(cm.__enter__)
        except Exception as e:
            ok = bool(
                await anyio.to_thread.run_sync(
                    cm.__exit__, type(e), e, e.__traceback__, limiter=exit_limiter
                )
            )
            if not ok:
                raise e
        else:
            await anyio.to_thread.run_sync(
                cm.__exit__, None, None, None, limiter=exit_limiter
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.5K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial007.py

    from unittest.mock import Mock, patch
    
    from docs_src.dependencies.tutorial007_py39 import get_db
    
    
    def test_get_db():  # Just for coverage
        async def test_async_gen():
            cm = asynccontextmanager(get_db)
            async with cm() as db_session:
                return db_session
    
        dbsession_moock = Mock()
    
        with patch(
            "docs_src.dependencies.tutorial007_py39.DBSession",
            return_value=dbsession_moock,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 642 bytes
    - Viewed (0)
Back to top