Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for process_item (0.06 sec)

  1. docs_src/python_types/tutorial008b_py310.py

    def process_item(item: int | str):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 51 bytes
    - Viewed (0)
  2. docs_src/python_types/tutorial008b_py39.py

    from typing import Union
    
    
    def process_item(item: Union[int, str]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 84 bytes
    - Viewed (0)
  3. tests/test_tutorial/test_python_types/test_tutorial008b.py

        mod = importlib.import_module(f"docs_src.python_types.{request.param}")
        return mod
    
    
    def test_process_items(module: ModuleType):
        with patch("builtins.print") as mock_print:
            module.process_item("a")
    
        assert mock_print.call_count == 1
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 637 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_python_types/test_tutorial007.py

    from docs_src.python_types.tutorial007_py39 import process_items
    
    
    def test_process_items():
        items_t = (1, 2, "foo")
        items_s = {b"a", b"b", b"c"}
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Dec 26 10:43:02 UTC 2025
    - 220 bytes
    - Viewed (0)
  5. 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)
  6. 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)
  7. docs_src/python_types/tutorial006_py39.py

    def process_items(items: list[str]):
        for item in items:
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 80 bytes
    - Viewed (0)
  8. docs_src/python_types/tutorial007_py39.py

    def process_items(items_t: tuple[int, int, str], items_s: set[bytes]):
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Fri Jan 07 14:11:31 UTC 2022
    - 99 bytes
    - Viewed (0)
  9. docs_src/middleware/tutorial001_py39.py

    
    @app.middleware("http")
    async def add_process_time_header(request: Request, call_next):
        start_time = time.perf_counter()
        response = await call_next(request)
        process_time = time.perf_counter() - start_time
        response.headers["X-Process-Time"] = str(process_time)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 20:41:43 UTC 2025
    - 365 bytes
    - Viewed (0)
  10. docs_src/python_types/tutorial008_py39.py

    def process_items(prices: dict[str, float]):
        for item_name, item_price in prices.items():
            print(item_name)
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sun Jan 16 14:44:08 UTC 2022
    - 145 bytes
    - Viewed (0)
Back to top