Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 116 for py_test (0.19 sec)

  1. ci/official/utilities/code_check_full.bats

      # Find all Python py_test targets not tagged "no_pip" or "manual", excluding
      # any targets in ignored packages. Combine this list of targets into a bazel
      # query list (e.g. the list becomes "target+target2+target3")
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Mar 06 21:54:13 GMT 2024
    - 13.2K bytes
    - Viewed (0)
  2. ci/official/containers/linux_arm64/devel.usertools/aarch64_clang.bazelrc

    test --test_timeout=500,900,-1,-1
    # Give only the list of failed tests at the end of the log
    test --test_summary=short
    
    # "nonpip" tests are regular py_test tests.
    # Pass --config=nonpip to run the same suite of tests. If you want to run just
    # one test for investigation, you don't need --config=nonpip; just run the
    # bazel test invocation as normal.
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Nov 21 12:25:39 GMT 2023
    - 6.3K bytes
    - Viewed (0)
  3. ci/official/containers/linux_arm64/devel.usertools/aarch64.bazelrc

    test --test_timeout=500,900,-1,-1
    # Give only the list of failed tests at the end of the log
    test --test_summary=short
    
    # "nonpip" tests are regular py_test tests.
    # Pass --config=nonpip to run the same suite of tests. If you want to run just
    # one test for investigation, you don't need --config=nonpip; just run the
    # bazel test invocation as normal.
    Plain Text
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Nov 21 12:25:39 GMT 2023
    - 5.8K bytes
    - Viewed (0)
  4. tests/test_ambiguous_params.py

    import pytest
    from fastapi import Depends, FastAPI, Path
    from fastapi.param_functions import Query
    from fastapi.testclient import TestClient
    from fastapi.utils import PYDANTIC_V2
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    
    def test_no_annotated_defaults():
        with pytest.raises(
            AssertionError, match="Path parameters cannot have a default value"
        ):
    
            @app.get("/items/{item_id}/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  5. docs/en/docs/tutorial/testing.md

    ## Run it
    
    After that, you just need to install `pytest`:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    It will detect the files and tests automatically, execute them, and report the results back to you.
    
    Run the tests with:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6.2K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/testing.md

    ## Запуск тестов
    
    Далее Вам нужно установить `pytest`:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    Он автоматически найдёт все файлы и тесты, выполнит их и предоставит Вам отчёт о результатах тестирования.
    
    Запустите тесты командой `pytest` и увидите результат:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_dependencies/test_tutorial008d_an.py

    import pytest
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial008d_an import app
    
        client = TestClient(app)
        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
        assert response.json() == {"detail": "Item not found, there's only a plumbus here"}
    
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.2K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_dependencies/test_tutorial008c.py

    import pytest
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial008c import app
    
        client = TestClient(app)
        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_dependencies/test_tutorial008c_an.py

    import pytest
    from fastapi.exceptions import FastAPIError
    from fastapi.testclient import TestClient
    
    
    @pytest.fixture(name="client")
    def get_client():
        from docs_src.dependencies.tutorial008c_an import app
    
        client = TestClient(app)
        return client
    
    
    def test_get_no_item(client: TestClient):
        response = client.get("/items/foo")
        assert response.status_code == 404, response.text
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Feb 24 23:06:37 GMT 2024
    - 1.1K bytes
    - Viewed (0)
  10. docs/de/docs/tutorial/testing.md

    ## Tests ausführen
    
    Danach müssen Sie nur noch `pytest` installieren:
    
    <div class="termy">
    
    ```console
    $ pip install pytest
    
    ---> 100%
    ```
    
    </div>
    
    Es erkennt die Dateien und Tests automatisch, führt sie aus und berichtet Ihnen die Ergebnisse.
    
    Führen Sie die Tests aus, mit:
    
    <div class="termy">
    
    ```console
    $ pytest
    
    ================ test session starts ================
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:20:01 GMT 2024
    - 7K bytes
    - Viewed (0)
Back to top