Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 11 - 20 of 1,102 for DEF (0.01 seconds)

  1. build-logic/cleanup/src/test/groovy/gradlebuild/cleanup/services/LeakingProcessKillPatternTest.groovy

            def projectDir = 'C:\\some\\agent\\workspace'
    
            expect:
            (line =~ KillLeakingJavaProcesses.generateLeakingProcessKillPattern(projectDir)).find()
        }
    
        def "matches daemon process started by performance test on Windows"() {
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Fri Jul 12 03:42:46 GMT 2024
    - 14.8K bytes
    - Click Count (0)
  2. tests/test_params_repr.py

    test_data: list[Any] = ["teststr", None, ..., 1, []]
    
    
    def get_user():
        return {}  # pragma: no cover
    
    
    def test_param_repr_str():
        assert repr(Param("teststr")) == "Param(teststr)"
    
    
    def test_param_repr_none():
        assert repr(Param(None)) == "Param(None)"
    
    
    def test_param_repr_ellipsis():
        assert repr(Param(...)) == "Param(PydanticUndefined)"
    
    
    def test_param_repr_number():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sat Dec 27 18:19:10 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  3. tests/test_dependency_contextmanager.py

    
    async def context_b(state: dict = Depends(context_a)):
        state["context_b"] = "started b"
        try:
            yield state
        finally:
            state["context_b"] = f"finished b with a: {state['context_a']}"
    
    
    @app.get("/async")
    async def get_async(state: str = Depends(asyncgen_state)):
        return state
    
    
    @app.get("/sync")
    async def get_sync(state: str = Depends(generator_state)):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 11.5K bytes
    - Click Count (0)
  4. tests/test_router_events.py

        def app_startup() -> None:
            state.app_startup = True
    
        @app.on_event("shutdown")
        def app_shutdown() -> None:
            state.app_shutdown = True
    
        router = APIRouter()
    
        @router.on_event("startup")
        def router_startup() -> None:
            state.router_startup = True
    
        @router.on_event("shutdown")
        def router_shutdown() -> None:
            state.router_shutdown = True
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 11.7K bytes
    - Click Count (0)
  5. tests/test_dependency_yield_scope.py

    router = APIRouter()
    
    
    @router.get("/")
    def get_index():
        return {"status": "ok"}
    
    
    @app.get("/function-scope")
    def function_scope(session: SessionFuncDep) -> Any:
        def iter_data():
            yield json.dumps({"is_open": session.open})
    
        return StreamingResponse(iter_data())
    
    
    @app.get("/request-scope")
    def request_scope(session: SessionRequestDep) -> Any:
        def iter_data():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 6.7K bytes
    - Click Count (0)
  6. tests/test_jsonable_encoder.py

    
    class Person:
        def __init__(self, name: str):
            self.name = name
    
    
    class Pet:
        def __init__(self, owner: Person, name: str):
            self.owner = owner
            self.name = name
    
    
    @dataclass
    class Item:
        name: str
        count: int
    
    
    class DictablePerson(Person):
        def __iter__(self):
            return ((k, v) for k, v in self.__dict__.items())
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Tue Feb 17 09:59:14 GMT 2026
    - 9.2K bytes
    - Click Count (0)
  7. build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/UpdateAgpVersionsTest.groovy

            then:
            def ex = thrown(IllegalArgumentException)
            ex.message == "minimumSupported must be at least 9.0.0, was 8.9.0"
        }
    
        def "fail when minimumSupported higher than gradle major when no matching gradle major stable or rc available"() {
            given:
            def gradleVersion = GradleVersion.version("9.2")
            def minimumSupported = VersionNumber.parse("7.9")
    Created: Wed Apr 01 11:36:16 GMT 2026
    - Last Modified: Thu Jan 15 06:57:24 GMT 2026
    - 4.7K bytes
    - Click Count (0)
  8. tests/test_multipart_installation.py

        with pytest.raises(RuntimeError, match=multipart_incorrect_install_error):
            app = FastAPI()
    
            @app.post("/")
            async def root(username: str = Form()):
                return username  # pragma: nocover
    
    
    def test_incorrect_multipart_installed_file_upload(monkeypatch):
        monkeypatch.setattr("python_multipart.__version__", "0.0.12")
        with warnings.catch_warnings(record=True):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Oct 27 21:46:26 GMT 2024
    - 5.7K bytes
    - Click Count (0)
  9. tests/test_default_response_class.py

    @router_a_a.get("/")
    def get_a_a():
        return {"msg": "Hello A A"}
    
    
    @router_a_a.get("/override", response_class=PlainTextResponse)
    def get_a_a_path_override():
        return "Hello A A"
    
    
    @router_a_b_override.get("/")
    def get_a_b():
        return "Hello A B"
    
    
    @router_a_b_override.get("/override", response_class=HTMLResponse)
    def get_a_b_path_override():
        return "Hello A B"
    
    
    @router_b_override.get("/")
    def get_b():
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Sun Mar 01 20:49:20 GMT 2020
    - 5.2K bytes
    - Click Count (0)
  10. fastapi/_compat/shared.py

            if isinstance(cls, WithArgsTypes):
                return False
            raise  # pragma: no cover
    
    
    def _annotation_is_sequence(annotation: type[Any] | None) -> bool:
        if lenient_issubclass(annotation, (str, bytes)):
            return False
        return lenient_issubclass(annotation, sequence_types)
    
    
    def field_annotation_is_sequence(annotation: type[Any] | None) -> bool:
        origin = get_origin(annotation)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Feb 11 18:32:12 GMT 2026
    - 6.9K bytes
    - Click Count (0)
Back to Top