← mined_baseline

fastapi_10895

failed NO_PATCH NO_PATCH UNSUBMITTED empty_patch(None) · None tool calls · 0 s · fastapi/fastapi

Task input

(not found in data/tasks.jsonl)

Tool calls (0)

#ToolArgumentsResult
No trace captured.

Test output

show
..F
=================================== FAILURES ===================================
_____________________________ test_openapi_schema ______________________________

client = <starlette.testclient.TestClient object at 0x106397390>

    @needs_pydanticv2
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
>       assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/": {
                    "get": {
                        "summary": "Read Root",
                        "operationId": "read_root__get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {
                                    "application/json": {
                                        "schema": {"$ref": "#/components/schemas/Rectangle"}
                                    }
                                },
                            }
                        },
                    }
                },
                "/responses": {
                    "get": {
                        "summary": "Read Responses",
                        "operationId": "read_responses_responses_get",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {
                                    "application/json": {
                                        "schema": {"$ref": "#/components/schemas/Rectangle"}
                                    }
                                },
                            }
                        },
                    }
                },
            },
            "components": {
                "schemas": {
                    "Rectangle": {
                        "properties": {
                            "width": {"type": "integer", "title": "Width"},
                            "length": {"type": "integer", "title": "Length"},
                            "area": {"type": "integer", "title": "Area", "readOnly": True},
                        },
                        "type": "object",
                        "required": ["width", "length", "area"],
                        "title": "Rectangle",
                    }
                }
            },
        }
E       AssertionError: assert {'openapi': '...Rectangle'}}}} == {'openapi': '...Rectangle'}}}}
E         
E         Omitting 2 identical items, use -vv to show
E         Differing items:
E         {'components': {'schemas': {'Rectangle-Input': {'properties': {'width': {'type': 'integer', 'title': 'Width'}, 'length...title': 'Area', 'readOnly': True}}, 'type': 'object', 'required': ['width', 'length', 'area'], 'title': 'Rectangle'}}}} != {'components': {'schemas': {'Rectangle': {'properties': {'width': {'type': 'integer', 'title': 'Width'}, 'length': {'t...title': 'Area', 'readOnly': True}}, 'type': 'object', 'required': ['width', 'length', 'area'], 'title': 'Rectangle'}}}}
E         {'paths': {'/': {'get': {'summary...
E         
E         ...Full output truncated (2 lines hidden), use '-vv' to show

tests/test_computed_fields.py:47: AssertionError
=============================== warnings summary ===============================
../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.38.6-py3-none-any/starlette/formparsers.py:12
  /Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.38.6-py3-none-any/starlette/formparsers.py:12: PendingDeprecationWarning: Please use `import python_multipart` instead.
    import multipart

../../../../../../Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.38.6-py3-none-any/starlette/testclient.py:40
  /Users/jp/repos/kaggle-gemini-coding-agent-post-training/.envs/overlays/starlette-0.38.6-py3-none-any/starlette/testclient.py:40: DeprecationWarning: The anyio.abc.BlockingPortal alias is deprecated, use anyio.from_thread.BlockingPortal instead.
    _PortalFactoryType = typing.Callable[[], typing.ContextManager[anyio.abc.BlockingPortal]]

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
!!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
1 failed, 2 passed, 2 warnings in 0.64s