- Sort Score
- Result 10 results
- Languages All
Results 21 - 30 of 99 for test_main (0.08 sec)
-
docs/en/docs/tutorial/testing.md
{* ../../docs_src/app_testing/app_a_py39/main.py *} ### Testing file { #testing-file } Then you could have a file `test_main.py` with your tests. It could live on the same Python package (the same directory with a `__init__.py` file): ``` hl_lines="5" . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 6.1K bytes - Viewed (0) -
docs/uk/docs/tutorial/testing.md
{* ../../docs_src/app_testing/main.py *} ### Файл тестування Ви можете створити файл `test_main.py` з Вашими тестами. Він може знаходитися в тому ж пакеті Python (у тій самій директорії з файлом `__init__.py`): ``` hl_lines="5" . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 9.5K bytes - Viewed (0) -
docs/en/docs/advanced/async-tests.md
``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` The file `main.py` would have: {* ../../docs_src/async_tests/app_a_py39/main.py *} The file `test_main.py` would have the tests for `main.py`, it could look like this now: {* ../../docs_src/async_tests/app_a_py39/test_main.py *} ## Run it { #run-it } You can run your tests as usual via:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4K bytes - Viewed (0) -
docs/de/docs/tutorial/testing.md
### Testdatei { #testing-file } Dann könnten Sie eine Datei `test_main.py` mit Ihren Tests haben. Sie könnte sich im selben Python-Package befinden (dasselbe Verzeichnis mit einer `__init__.py`-Datei): ``` hl_lines="5" . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 7K bytes - Viewed (0) -
docs/zh/docs/advanced/async-tests.md
``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` 文件 `main.py` 将包含: {* ../../docs_src/async_tests/main.py *} 文件 `test_main.py` 将包含针对 `main.py` 的测试,现在它可能看起来如下: {* ../../docs_src/async_tests/test_main.py *} ## 运行测试 您可以通过以下方式照常运行测试: <div class="termy"> ```console $ pytest ---> 100% ```Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 17 21:49:06 UTC 2024 - 3.9K bytes - Viewed (0) -
docs/de/docs/advanced/async-tests.md
``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` Die Datei `main.py` hätte als Inhalt: {* ../../docs_src/async_tests/app_a_py39/main.py *} Die Datei `test_main.py` hätte die Tests für `main.py`, das könnte jetzt so aussehen: {* ../../docs_src/async_tests/app_a_py39/test_main.py *} ## Es ausführen { #run-it } Sie können Ihre Tests wie gewohnt ausführen mit:Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 4.5K bytes - Viewed (1) -
docs/ja/docs/tutorial/testing.md
### **FastAPI** アプリファイル **FastAPI** アプリに `main.py` ファイルがあるとします: {* ../../docs_src/app_testing/main.py *} ### テストファイル 次に、テストを含む `test_main.py` ファイルを作成し、`main` モジュール (`main.py`) から `app` をインポートします: {* ../../docs_src/app_testing/test_main.py *} ## テスト: 例の拡張 次に、この例を拡張し、詳細を追加して、さまざまなパーツをテストする方法を確認しましょう。 ### 拡張版 **FastAPI** アプリファイル **FastAPI** アプリに `main_b.py` ファイルがあるとします。Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Oct 11 17:48:49 UTC 2025 - 5.6K bytes - Viewed (0) -
tests/test_tutorial/test_async_tests/test_main_a.py
import pytest from docs_src.async_tests.app_a_py39.test_main import test_root @pytest.mark.anyio async def test_async_testing():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 154 bytes - Viewed (0) -
docs/ko/docs/advanced/async-tests.md
``` . ├── app │ ├── __init__.py │ ├── main.py │ └── test_main.py ``` `main.py`는 아래와 같아야 합니다: {* ../../docs_src/async_tests/main.py *} `test_main.py` 파일은 `main.py`에 대한 테스트가 있을 텐데, 다음과 같을 수 있습니다: {* ../../docs_src/async_tests/test_main.py *} ## 실행하기 아래의 명령어로 테스트 코드를 실행합니다: <div class="termy"> ```console $ pytest ---> 100%Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Tue Dec 10 11:03:16 UTC 2024 - 4.7K bytes - Viewed (0) -
tests/test_tutorial/test_behind_a_proxy/test_tutorial001.py
from fastapi.testclient import TestClient from docs_src.behind_a_proxy.tutorial001_py39 import app client = TestClient(app, root_path="/api/v1") def test_main(): response = client.get("/app") assert response.status_code == 200 assert response.json() == {"message": "Hello World", "root_path": "/api/v1"} def test_openapi(): response = client.get("/openapi.json") assert response.status_code == 200
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 20:41:43 UTC 2025 - 1K bytes - Viewed (0)