Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for traceback (0.03 sec)

  1. docs_src/dependencies/tutorial010_py39.py

    class MySuperContextManager:
        def __init__(self):
            self.db = DBSession()
    
        def __enter__(self):
            return self.db
    
        def __exit__(self, exc_type, exc_value, traceback):
            self.db.close()
    
    
    async def get_db():
        with MySuperContextManager() as db:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 292 bytes
    - Viewed (0)
  2. tests/test_exception_handlers.py

    def test_traceback_for_dependency_with_yield():
        client = TestClient(app, raise_server_exceptions=True)
        with pytest.raises(ValueError) as exc_info:
            client.get("/dependency-with-yield")
        last_frame = exc_info.traceback[-1]
        assert str(last_frame.path) == __file__
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 03 22:37:12 UTC 2024
    - 2.4K bytes
    - Viewed (0)
Back to top