Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for test_main (0.19 sec)

  1. docs/de/docs/tutorial/testing.md

    ```Python
    {!../../../docs_src/app_testing/main.py!}
    ```
    
    ### Testdatei
    
    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
    ```
    
    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)
  2. docs/ru/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
    ```
    
    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)
  3. docs/en/docs/tutorial/testing.md

    ```Python
    {!../../../docs_src/app_testing/main.py!}
    ```
    
    ### 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
    ```
    
    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)
  4. docs/em/docs/tutorial/testing.md

    ```
    
    ### 🔬 📁
    
    ⤴️ 👆 💪 ✔️ 📁 `test_main.py` ⏮️ 👆 💯. ⚫️ 💪 🖖 🔛 🎏 🐍 📦 (🎏 📁 ⏮️ `__init__.py` 📁):
    
    ``` hl_lines="5"
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    ↩️ 👉 📁 🎏 📦, 👆 💪 ⚙️ ⚖ 🗄 🗄 🎚 `app` ⚪️➡️ `main` 🕹 (`main.py`):
    
    ```Python hl_lines="3"
    {!../../../docs_src/app_testing/test_main.py!}
    ```
    
    ...& ✔️ 📟 💯 💖 ⏭.
    
    ## 🔬: ↔ 🖼
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 5.2K bytes
    - Viewed (0)
  5. docs/zh/docs/tutorial/testing.md

    {!../../../docs_src/app_testing/main.py!}
    ```
    
    ### 测试文件
    
    然后你会有一个包含测试的文件 `test_main.py` 。app可以像Python包那样存在(一样是目录,但有个 `__init__.py` 文件):
    
    ``` hl_lines="5"
    .
    ├── app
    │   ├── __init__.py
    │   ├── main.py
    │   └── test_main.py
    ```
    
    因为这文件在同一个包中,所以你可以通过相对导入从 `main` 模块(`main.py`)导入`app`对象:
    
    ```Python hl_lines="3"
    {!../../../docs_src/app_testing/test_main.py!}
    ```
    
    ...然后测试代码和之前一样的。
    
    ## 测试:扩展示例
    
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 6K bytes
    - Viewed (0)
  6. docs/ja/docs/tutorial/testing.md

    ### **FastAPI** アプリファイル
    
    **FastAPI** アプリに `main.py` ファイルがあるとします:
    
    ```Python
    {!../../../docs_src/app_testing/main.py!}
    ```
    
    ### テストファイル
    
    次に、テストを含む `test_main.py` ファイルを作成し、`main` モジュール (`main.py`) から `app` をインポートします:
    
    ```Python
    {!../../../docs_src/app_testing/test_main.py!}
    ```
    
    ## テスト: 例の拡張
    
    次に、この例を拡張し、詳細を追加して、さまざまなパーツをテストする方法を確認しましょう。
    
    
    ### 拡張版 **FastAPI** アプリファイル
    
    **FastAPI** アプリに `main_b.py` ファイルがあるとします。
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat Mar 18 16:16:02 GMT 2023
    - 5.8K bytes
    - Viewed (0)
Back to top