Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,770 for assert (0.2 sec)

  1. guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          future.get();
          Assert.fail("This call was supposed to throw an ExecutionException");
        } catch (ExecutionException expected) {
          Assert.assertSame(expectedCause, expected.getCause());
        }
      }
    
      public void assertTimeout() throws Exception {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  2. android/guava-testlib/src/com/google/common/util/concurrent/testing/MockFutureListener.java

        // Verify that the listener executed in a reasonable amount of time.
        Assert.assertTrue(countDownLatch.await(1L, SECONDS));
    
        try {
          future.get();
          Assert.fail("This call was supposed to throw an ExecutionException");
        } catch (ExecutionException expected) {
          Assert.assertSame(expectedCause, expected.getCause());
        }
      }
    
      public void assertTimeout() throws Exception {
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Fri May 12 18:12:42 GMT 2023
    - 3K bytes
    - Viewed (0)
  3. android/guava-testlib/src/com/google/common/escape/testing/EscaperAsserts.java

        // Escapers operate on characters: no characters, no escaping.
        Assert.assertEquals("", escaper.escape(""));
        // Assert that escapers throw null pointer exceptions.
        try {
          escaper.escape((String) null);
          Assert.fail("exception not thrown when escaping a null string");
        } catch (NullPointerException e) {
          // pass
        }
      }
    
      /**
       * Asserts that an escaper escapes the given character into the expected string.
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Tue Jan 18 20:55:09 GMT 2022
    - 3.8K bytes
    - Viewed (0)
  4. tensorflow/c/eager/c_api_test.cc

      ASSERT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(status.get()));
      ASSERT_EQ(device_name, nullptr);
      ASSERT_EQ("Invalid handle", string(TF_Message(status.get())));
    
      TF_SetStatus(status.get(), TF_OK, "");
    
      int num_dims = TFE_TensorHandleNumDims(h, status.get());
      ASSERT_EQ(TF_INVALID_ARGUMENT, TF_GetCode(status.get()));
      ASSERT_EQ(num_dims, -1);
      ASSERT_EQ("Invalid handle", string(TF_Message(status.get())));
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Thu Aug 03 20:50:20 GMT 2023
    - 94.6K bytes
    - Viewed (1)
  5. tests/test_jsonable_encoder.py

    def test_encode_dict():
        pet = {"name": "Firulais", "owner": {"name": "Foo"}}
        assert jsonable_encoder(pet) == {"name": "Firulais", "owner": {"name": "Foo"}}
        assert jsonable_encoder(pet, include={"name"}) == {"name": "Firulais"}
        assert jsonable_encoder(pet, exclude={"owner"}) == {"name": "Firulais"}
        assert jsonable_encoder(pet, include={}) == {}
        assert jsonable_encoder(pet, exclude={}) == {
            "name": "Firulais",
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Wed Aug 02 15:28:34 GMT 2023
    - 8.8K bytes
    - Viewed (0)
  6. tensorflow/c/eager/c_api_unified_experimental_test.cc

      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
    
      // Execute.
      TF_ExecuteOperation(add_op, 2, inputs, add_outputs, status.get());
      ASSERT_EQ(TF_OK, TF_GetCode(status.get())) << TF_Message(status.get());
    
      // Test that full type information can be accessed.
      auto outs = unwrap(add_outputs);
      auto h = outs->outputs[0];
      ASSERT_NE(h, nullptr);
    C++
    - Registered: Tue Apr 16 12:39:09 GMT 2024
    - Last Modified: Fri May 19 21:44:52 GMT 2023
    - 39.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_security/test_tutorial005_an_py39.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py39
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_security/test_tutorial005_py310.py

        assert response.status_code == 400, response.text
        assert response.json() == {"detail": "Incorrect username or password"}
    
    
    @needs_py310
    def test_no_token(client: TestClient):
        response = client.get("/users/me")
        assert response.status_code == 401, response.text
        assert response.json() == {"detail": "Not authenticated"}
        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Wed Mar 13 19:07:10 GMT 2024
    - 16.3K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py

    
    def test_swagger_ui():
        response = client.get("/docs")
        assert response.status_code == 200, response.text
        assert (
            '"deepLinking": false,' in response.text
        ), "overridden configs should be preserved"
        assert (
            '"deepLinking": true' not in response.text
        ), "overridden configs should not include the old value"
        assert (
            '"syntaxHighlight": false' not in response.text
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.5K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_websockets/test_tutorial002_an.py

                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
                data = websocket.receive_text()
                assert data == f"Message text was: {message}, for item ID: foo"
                message = "Message two"
                websocket.send_text(message)
                data = websocket.receive_text()
                assert data == "Session cookie or query token value is: fakesession"
    Python
    - Registered: Sun Apr 14 07:19:09 GMT 2024
    - Last Modified: Sat Mar 18 12:29:59 GMT 2023
    - 3.6K bytes
    - Viewed (0)
Back to top