Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 34 for batch (0.01 sec)

  1. tests/test_tutorial/test_python_types/test_tutorial009c.py

    
    def test_say_hi(module: ModuleType):
        with patch("builtins.print") as mock_print:
            module.say_hi("FastAPI")
    
        mock_print.assert_called_once_with("Hey FastAPI!")
    
        with pytest.raises(
            TypeError,
            match=re.escape("say_hi() missing 1 required positional argument: 'name'"),
        ):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 777 bytes
    - Viewed (0)
  2. tests/test_tutorial/test_dependencies/test_tutorial008.py

        b_mock = Mock()
        c_mock = Mock()
    
        with (
            patch(
                f"{module.__name__}.generate_dep_a",
                return_value=a_mock,
                create=True,
            ),
            patch(
                f"{module.__name__}.generate_dep_b",
                return_value=b_mock,
                create=True,
            ),
            patch(
                f"{module.__name__}.generate_dep_c",
                return_value=c_mock,
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_python_types/test_tutorial006.py

    from unittest.mock import patch
    
    from docs_src.python_types.tutorial006_py39 import process_items
    
    
    def test_process_items():
        with patch("builtins.print") as mock_print:
            process_items(["item_a", "item_b", "item_c"])
    
        assert mock_print.call_count == 3
        call_args = [arg.args for arg in mock_print.call_args_list]
        assert call_args == [
            ("item_a",),
            ("item_b",),
            ("item_c",),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 426 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_python_types/test_tutorial008.py

    from unittest.mock import patch
    
    from docs_src.python_types.tutorial008_py39 import process_items
    
    
    def test_process_items():
        with patch("builtins.print") as mock_print:
            process_items({"a": 1.0, "b": 2.5})
    
        assert mock_print.call_count == 4
        call_args = [arg.args for arg in mock_print.call_args_list]
        assert call_args == [
            ("a",),
            (1.0,),
            ("b",),
            (2.5,),
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 417 bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/body-updates.md

    Und die Daten würden mit diesem „neuen“ `tax` von `10.5` gespeichert werden.
    
    ## Teil-Aktualisierungen mit `PATCH` { #partial-updates-with-patch }
    
    Sie können auch die <a href="https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PATCH" class="external-link" target="_blank">HTTP `PATCH`</a> Operation verwenden, um Daten *teilweise* zu ersetzen.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 5.1K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_dependencies/test_tutorial007.py

    from contextlib import asynccontextmanager
    from unittest.mock import Mock, patch
    
    from docs_src.dependencies.tutorial007_py39 import get_db
    
    
    def test_get_db():  # Just for coverage
        async def test_async_gen():
            cm = asynccontextmanager(get_db)
            async with cm() as db_session:
                return db_session
    
        dbsession_moock = Mock()
    
        with patch(
            "docs_src.dependencies.tutorial007_py39.DBSession",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 642 bytes
    - Viewed (0)
  7. tests/test_tutorial/test_python_types/test_tutorial001_tutorial002.py

    import runpy
    from unittest.mock import patch
    
    import pytest
    
    
    @pytest.mark.parametrize(
        "module_name",
        [
            "tutorial001_py39",
            "tutorial002_py39",
        ],
    )
    def test_run_module(module_name: str):
        with patch("builtins.print") as mock_print:
            runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__")
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 398 bytes
    - Viewed (0)
  8. tests/test_tutorial/test_python_types/test_tutorial008b.py

    import importlib
    from types import ModuleType
    from unittest.mock import patch
    
    import pytest
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="module",
        params=[
            pytest.param("tutorial008b_py39"),
            pytest.param("tutorial008b_py310", marks=needs_py310),
        ],
    )
    def get_module(request: pytest.FixtureRequest):
        mod = importlib.import_module(f"docs_src.python_types.{request.param}")
        return mod
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 637 bytes
    - Viewed (0)
  9. tests/test_tutorial/test_python_types/test_tutorial011.py

    import runpy
    from unittest.mock import patch
    
    import pytest
    
    from ...utils import needs_py310
    
    
    @pytest.mark.parametrize(
        "module_name",
        [
            pytest.param("tutorial011_py39"),
            pytest.param("tutorial011_py310", marks=needs_py310),
        ],
    )
    def test_run_module(module_name: str):
        with patch("builtins.print") as mock_print:
            runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__")
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 691 bytes
    - Viewed (0)
  10. scripts/docs.py

    {% endfor %}
    
    """
    
    
    def remove_header_permalinks(content: str):
        lines: list[str] = []
        for line in content.split("\n"):
            match = header_with_permalink_pattern.match(line)
            if match:
                hashes, title, *_ = match.groups()
                line = f"{hashes} {title}"
            lines.append(line)
        return "\n".join(lines)
    
    
    def generate_readme_content() -> str:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Dec 21 17:40:17 UTC 2025
    - 16.9K bytes
    - Viewed (0)
Back to top