Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for test_catching (0.81 sec)

  1. tests/test_dependency_after_yield_raise.py

    
    @app.get("/broken")
    def broken(d: Annotated[str, Depends(broken_dep)]) -> Any:
        return {"message": "all good?"}
    
    
    client = TestClient(app)
    
    
    def test_catching():
        response = client.get("/catching")
        assert response.status_code == 418
        assert response.json() == {"detail": "Session error"}
    
    
    def test_broken_raise():
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 1.7K bytes
    - Viewed (0)
  2. guava-tests/test/com/google/common/util/concurrent/FluentFutureTest.java

        assertThat(called[0]).isTrue();
      }
    
      // Avoid trouble with automatic mapping between JRE and Kotlin runtime classes.
      static class CustomRuntimeException extends RuntimeException {}
    
      public void testCatching() throws Exception {
        FluentFuture<?> f =
            FluentFuture.from(immediateFailedFuture(new CustomRuntimeException()))
                .catching(
                    Throwable.class,
    Registered: Fri Dec 26 12:43:10 UTC 2025
    - Last Modified: Tue Sep 23 17:50:58 UTC 2025
    - 5.7K bytes
    - Viewed (0)
Back to top