Home / File/ test_tutorial001_tutorial002.py — fastapi Source File

test_tutorial001_tutorial002.py — fastapi Source File

Architecture documentation for test_tutorial001_tutorial002.py, a python file in the fastapi codebase. 3 imports, 0 dependents.

File python FastAPI Routing 3 imports 1 functions

Entity Profile

Dependency Diagram

graph LR
  93f951e4_e0e4_83df_497c_da5a95b03f4f["test_tutorial001_tutorial002.py"]
  238ca8dc_67ac_a93a_ec78_fc27ec421619["runpy"]
  93f951e4_e0e4_83df_497c_da5a95b03f4f --> 238ca8dc_67ac_a93a_ec78_fc27ec421619
  d1bf66df_8a92_7a7c_dab4_0865060effa4["unittest.mock"]
  93f951e4_e0e4_83df_497c_da5a95b03f4f --> d1bf66df_8a92_7a7c_dab4_0865060effa4
  5befe8bf_65d1_d058_6b78_4a597a8488e9["pytest"]
  93f951e4_e0e4_83df_497c_da5a95b03f4f --> 5befe8bf_65d1_d058_6b78_4a597a8488e9
  style 93f951e4_e0e4_83df_497c_da5a95b03f4f fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

import runpy
from unittest.mock import patch

import pytest


@pytest.mark.parametrize(
    "module_name",
    [
        "tutorial001_py39",
        "tutorial002_py39",
    ],
)
def test_run_module(module_name: str):
    with patch("builtins.print") as mock_print:
        runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__")

    mock_print.assert_called_with("John Doe")

Domain

Subdomains

Functions

Dependencies

  • pytest
  • runpy
  • unittest.mock

Frequently Asked Questions

What does test_tutorial001_tutorial002.py do?
test_tutorial001_tutorial002.py is a source file in the fastapi codebase, written in python. It belongs to the FastAPI domain, Routing subdomain.
What functions are defined in test_tutorial001_tutorial002.py?
test_tutorial001_tutorial002.py defines 1 function(s): test_run_module.
What does test_tutorial001_tutorial002.py depend on?
test_tutorial001_tutorial002.py imports 3 module(s): pytest, runpy, unittest.mock.
Where is test_tutorial001_tutorial002.py in the architecture?
test_tutorial001_tutorial002.py is located at tests/test_tutorial/test_python_types/test_tutorial001_tutorial002.py (domain: FastAPI, subdomain: Routing, directory: tests/test_tutorial/test_python_types).

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free