- Sort Score
- Result 10 results
- Languages All
Results 501 - 510 of 1,127 for def2 (0.02 sec)
-
tensorflow/c/eager/c_api_cluster_test.cc
TFE_DeleteOp(op); TF_DeleteStatus(status); } void TestRemoteExecuteChangeServerDef(bool async) { tensorflow::ServerDef server_def = GetServerDef(2); // This server def has the task index set to 0. string serialized = server_def.SerializeAsString(); server_def.set_task_index(1); std::unique_ptr<tensorflow::GrpcServer> worker_server;
Registered: Tue Nov 05 12:39:12 UTC 2024 - Last Modified: Sat Oct 12 05:11:17 UTC 2024 - 19.2K bytes - Viewed (0) -
tests/test_tutorial/test_dependencies/test_tutorial001_an_py310.py
("/users", 200, {"q": None, "skip": 0, "limit": 100}), ], ) def test_get(path, expected_status, expected_response, client: TestClient): response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py310 def test_openapi_schema(client: TestClient): response = client.get("/openapi.json")
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 7.2K bytes - Viewed (0) -
tests/test_tutorial/test_cookie_params/test_tutorial001_an_py39.py
], ) def test(path, cookies, expected_status, expected_response): from docs_src.cookie_params.tutorial001_an_py39 import app client = TestClient(app, cookies=cookies) response = client.get(path) assert response.status_code == expected_status assert response.json() == expected_response @needs_py39 def test_openapi_schema():
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_header_params/test_tutorial003_an.py
# ("/items", [("x-token", "foo"), ("x-token", "bar")], 200, {"X-Token values": ["foo", "bar"]}), ], ) def test(path, headers, expected_status, expected_response): response = client.get(path, headers=headers) assert response.status_code == expected_status assert response.json() == expected_response def test_openapi_schema(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.1K bytes - Viewed (0) -
tests/test_tutorial/test_query_params/test_tutorial005.py
from fastapi.testclient import TestClient from docs_src.query_params.tutorial005 import app client = TestClient(app) def test_foo_needy_very(): response = client.get("/items/foo?needy=very") assert response.status_code == 200 assert response.json() == {"item_id": "foo", "needy": "very"} def test_foo_no_needy(): response = client.get("/items/foo") assert response.status_code == 422
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Apr 18 19:40:57 UTC 2024 - 4K bytes - Viewed (0) -
internal/grid/types_test.go
t.Errorf("MSS: %v != %v", v, v2) } } func BenchmarkMarshalMsgMSS(b *testing.B) { v := MSS{"abc": "def", "ghi": "jkl"} b.ReportAllocs() b.ResetTimer() for i := 0; i < b.N; i++ { v.MarshalMsg(nil) } } func BenchmarkAppendMsgMSS(b *testing.B) { v := MSS{"abc": "def", "ghi": "jkl"} bts := make([]byte, 0, v.Msgsize()) bts, _ = v.MarshalMsg(bts[0:0]) b.SetBytes(int64(len(bts)))
Registered: Sun Nov 03 19:28:11 UTC 2024 - Last Modified: Tue Nov 21 01:09:35 UTC 2023 - 3.7K bytes - Viewed (0) -
tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial006.py
from fastapi.testclient import TestClient from docs_src.path_operation_advanced_configuration.tutorial006 import app client = TestClient(app) def test_post(): response = client.post("/items/", content=b"this is actually not validated") assert response.status_code == 200, response.text assert response.json() == { "size": 30, "content": { "name": "Maaaagic", "price": 42,
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 1.9K bytes - Viewed (0) -
docs_src/app_testing/app_b_an_py310/main.py
@app.get("/items/{item_id}", response_model=Item) async def read_main(item_id: str, x_token: Annotated[str, Header()]): if x_token != fake_secret_token: raise HTTPException(status_code=400, detail="Invalid X-Token header") if item_id not in fake_db: raise HTTPException(status_code=404, detail="Item not found") return fake_db[item_id] @app.post("/items/", response_model=Item)
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Thu Aug 15 22:31:16 UTC 2024 - 1.1K bytes - Viewed (0) -
tests/test_tutorial/test_schema_extra_example/test_tutorial001_pv1.py
import pytest from fastapi.testclient import TestClient from ...utils import needs_pydanticv1 @pytest.fixture(name="client") def get_client(): from docs_src.schema_extra_example.tutorial001_pv1 import app client = TestClient(app) return client @needs_pydanticv1 def test_post_body_example(client: TestClient): response = client.put( "/items/5", json={ "name": "Foo",
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Fri Jul 07 17:12:13 UTC 2023 - 4.4K bytes - Viewed (0) -
fastapi/security/open_id_connect_url.py
from typing_extensions import Annotated, Doc class OpenIdConnect(SecurityBase): """ OpenID Connect authentication class. An instance of it would be used as a dependency. """ def __init__( self, *, openIdConnectUrl: Annotated[ str, Doc( """ The OpenID Connect URL. """ ), ],
Registered: Sun Nov 03 07:19:11 UTC 2024 - Last Modified: Tue Apr 02 02:48:51 UTC 2024 - 2.7K bytes - Viewed (0)