Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 248 for AssertionError (0.19 sec)

  1. tests/test_ambiguous_params.py

    app = FastAPI()
    
    
    def test_no_annotated_defaults():
        with pytest.raises(
            AssertionError, match="Path parameters cannot have a default value"
        ):
    
            @app.get("/items/{item_id}/")
            async def get_item(item_id: Annotated[int, Path(default=1)]):
                pass  # pragma: nocover
    
        with pytest.raises(
            AssertionError,
            match=(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  2. android/guava/src/com/google/common/collect/Cut.java

            BoundType boundType, DiscreteDomain<Comparable<?>> domain) {
          throw new AssertionError("this statement should be unreachable");
        }
    
        @Override
        void describeAsLowerBound(StringBuilder sb) {
          sb.append("(-\u221e");
        }
    
        @Override
        void describeAsUpperBound(StringBuilder sb) {
          throw new AssertionError();
        }
    
        @Override
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  3. tests/test_invalid_path_param.py

    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/{id}")
            def read_items(id: List[Item]):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Jun 03 17:59:40 GMT 2019
    - 1.7K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/platform/Jdk8WithJettyBootPlatform.kt

        } catch (e: InvocationTargetException) {
          throw AssertionError("failed to set ALPN", e)
        } catch (e: IllegalAccessException) {
          throw AssertionError("failed to set ALPN", e)
        }
      }
    
      override fun afterHandshake(sslSocket: SSLSocket) {
        try {
          removeMethod.invoke(null, sslSocket)
        } catch (e: IllegalAccessException) {
          throw AssertionError("failed to remove ALPN", e)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 6K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/platform/android/AndroidSocketAdapter.kt

            setAlpnProtocols.invoke(
              sslSocket,
              Platform.concatLengthPrefixed(protocols),
            )
          } catch (e: IllegalAccessException) {
            throw AssertionError(e)
          } catch (e: InvocationTargetException) {
            throw AssertionError(e)
          }
        }
      }
    
      override fun getSelectedProtocol(sslSocket: SSLSocket): String? {
        // No TLS extensions if the socket class is custom.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 4.6K bytes
    - Viewed (0)
  6. guava-gwt/src-super/com/google/common/collect/super/com/google/common/collect/RegularImmutableMultiset.java

      @Override
      public int count(@Nullable Object element) {
        throw new AssertionError();
      }
    
      @Override
      public ImmutableSet<E> elementSet() {
        throw new AssertionError();
      }
    
      @Override
      Entry<E> getEntry(int index) {
        throw new AssertionError();
      }
    
      @Override
      boolean isPartialView() {
        throw new AssertionError();
      }
    
      @Override
      public int size() {
    Java
    - Registered: Fri Apr 26 12:43:10 GMT 2024
    - Last Modified: Tue Jan 23 18:43:40 GMT 2024
    - 1.7K bytes
    - Viewed (0)
  7. guava/src/com/google/common/collect/Cut.java

            BoundType boundType, DiscreteDomain<Comparable<?>> domain) {
          throw new AssertionError("this statement should be unreachable");
        }
    
        @Override
        void describeAsLowerBound(StringBuilder sb) {
          sb.append("(-\u221e");
        }
    
        @Override
        void describeAsUpperBound(StringBuilder sb) {
          throw new AssertionError();
        }
    
        @Override
    Java
    - Registered: Fri Apr 05 12:43:09 GMT 2024
    - Last Modified: Thu Feb 22 21:19:52 GMT 2024
    - 12.3K bytes
    - Viewed (0)
  8. tests/test_invalid_sequence_param.py

    
    def test_invalid_sequence():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
                title: str
    
            @app.get("/items/")
            def read_items(q: List[Item] = Query(default=None)):
                pass  # pragma: no cover
    
    
    def test_invalid_tuple():
        with pytest.raises(AssertionError):
            app = FastAPI()
    
            class Item(BaseModel):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri May 13 23:38:22 GMT 2022
    - 1.2K bytes
    - Viewed (0)
  9. guava-tests/test/com/google/common/eventbus/DispatcherTest.java

                new Runnable() {
                  @Override
                  public void run() {
                    try {
                      barrier.await();
                    } catch (Exception e) {
                      throw new AssertionError(e);
                    }
    
                    dispatcher.dispatch(2, integerSubscribers.iterator());
                    latch.countDown();
                  }
                })
            .start();
    
        new Thread(
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Wed Apr 27 15:41:25 GMT 2022
    - 5.6K bytes
    - Viewed (0)
  10. mockwebserver/src/main/kotlin/mockwebserver3/internal/duplex/MockStreamHandler.kt

            val actual = stream.requestBody.readUtf8(expected.utf8Size())
            if (actual != expected) throw AssertionError("$actual != $expected")
          }
        }
    
      fun exhaustRequest() =
        apply {
          actions += { stream ->
            if (!stream.requestBody.exhausted()) throw AssertionError("expected exhausted")
          }
        }
    
      fun cancelStream() =
        apply {
          actions += { stream -> stream.cancel() }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 3.2K bytes
    - Viewed (0)
Back to top