Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 51 - 60 of 403 for mytest (0.07 seconds)

  1. docs/zh/docs/tutorial/testing.md

    ///
    
    ## 运行起来 { #run-it }
    
    之后,你只需要安装 `pytest`。
    
    确保你创建并激活一个[虚拟环境](../virtual-environments.md),然后再安装,例如:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    他会自动检测文件和测试,执行测试,然后向你报告结果。
    
    执行测试:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 17:06:37 GMT 2026
    - 5.4K bytes
    - Click Count (0)
  2. docs/de/docs/advanced/async-tests.md

    ## Es ausführen { #run-it }
    
    Sie können Ihre Tests wie gewohnt ausführen mit:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ---> 100%
    ```
    
    </div>
    
    ## Im Detail { #in-detail }
    
    Der Marker `@pytest.mark.anyio` teilt pytest mit, dass diese Testfunktion asynchron aufgerufen werden soll:
    
    {* ../../docs_src/async_tests/app_a_py310/test_main.py hl[7] *}
    
    /// tip | Tipp
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 17:58:09 GMT 2026
    - 4.3K bytes
    - Click Count (1)
  3. docs/en/docs/advanced/async-tests.md

    You can run your tests as usual via:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ---> 100%
    ```
    
    </div>
    
    ## In Detail { #in-detail }
    
    The marker `@pytest.mark.anyio` tells pytest that this test function should be called asynchronously:
    
    {* ../../docs_src/async_tests/app_a_py310/test_main.py hl[7] *}
    
    /// tip
    
    Note that the test function is now `async def` instead of just `def` as before when using the `TestClient`.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 3.8K bytes
    - Click Count (0)
  4. docs/uk/docs/advanced/async-tests.md

    ## Запуск { #run-it }
    
    Ви можете запустити тести як зазвичай:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ---> 100%
    ```
    
    </div>
    
    ## Докладно { #in-detail }
    
    Маркер `@pytest.mark.anyio` повідомляє pytest, що цю тестову функцію слід викликати асинхронно:
    
    {* ../../docs_src/async_tests/app_a_py310/test_main.py hl[7] *}
    
    /// tip | Порада
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 5.9K bytes
    - Click Count (0)
  5. docs/tr/docs/tutorial/testing.md

    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    Dosyaları ve testleri otomatik olarak bulur, çalıştırır ve sonuçları size raporlar.
    
    Testleri şu şekilde çalıştırın:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 07:53:17 GMT 2026
    - 6.3K bytes
    - Click Count (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial003.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial003_py310", marks=needs_py310),
            pytest.param("tutorial003_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 8.1K bytes
    - Click Count (0)
  7. tests/test_tutorial/test_body_multiple_params/test_tutorial001.py

    import importlib
    
    import pytest
    from fastapi.testclient import TestClient
    from inline_snapshot import snapshot
    
    from ...utils import needs_py310
    
    
    @pytest.fixture(
        name="client",
        params=[
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial001_an_py310", marks=needs_py310),
        ],
    )
    def get_client(request: pytest.FixtureRequest):
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 6.9K bytes
    - Click Count (0)
  8. docs/uk/docs/tutorial/testing.md

    Запустіть тести за допомогою:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    platform linux -- Python 3.6.9, pytest-5.3.5, py-1.8.1, pluggy-0.13.1
    rootdir: /home/user/code/superawesome-cli/app
    plugins: forked-1.1.3, xdist-1.31.0, cov-2.8.1
    collected 6 items
    
    ---> 100%
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 19 18:27:41 GMT 2026
    - 8.6K bytes
    - Click Count (0)
  9. tests/test_tutorial/test_body_nested_models/test_tutorial001_tutorial002_tutorial003.py

        params=[
            pytest.param("tutorial001_py310", marks=needs_py310),
            pytest.param("tutorial002_py310", marks=needs_py310),
            pytest.param("tutorial003_py310", marks=needs_py310),
        ],
    )
    def get_mod_name(request: pytest.FixtureRequest):
        return request.param
    
    
    @pytest.fixture(name="client")
    def get_client(mod_name: str):
        mod = importlib.import_module(f"docs_src.body_nested_models.{mod_name}")
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 12 13:19:43 GMT 2026
    - 8.5K bytes
    - Click Count (0)
  10. tests/test_security_scopes.py

    from typing import Annotated
    
    import pytest
    from fastapi import Depends, FastAPI, Security
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="call_counter")
    def call_counter_fixture():
        return {"count": 0}
    
    
    @pytest.fixture(name="app")
    def app_fixture(call_counter: dict[str, int]):
        def get_db():
            call_counter["count"] += 1
            return f"db_{call_counter['count']}"
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 17 21:25:59 GMT 2025
    - 1006 bytes
    - Click Count (0)
Back to Top