test_uvicorn_run_called_when_run_as_main() — fastapi Function Reference
Architecture documentation for the test_uvicorn_run_called_when_run_as_main() function in test_tutorial001.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 7f0ccbed_8991_303a_71f9_e51a27042003["test_uvicorn_run_called_when_run_as_main()"] 03bf4966_0b63_ba47_3315_0b938c7f27fa["test_tutorial001.py"] 7f0ccbed_8991_303a_71f9_e51a27042003 -->|defined in| 03bf4966_0b63_ba47_3315_0b938c7f27fa style 7f0ccbed_8991_303a_71f9_e51a27042003 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_tutorial/test_debugging/test_tutorial001.py lines 34–42
def test_uvicorn_run_called_when_run_as_main(): # Just for coverage
if sys.modules.get(MOD_NAME):
del sys.modules[MOD_NAME]
with unittest.mock.patch("uvicorn.run") as uvicorn_run_mock:
runpy.run_module(MOD_NAME, run_name="__main__")
uvicorn_run_mock.assert_called_once_with(
unittest.mock.ANY, host="0.0.0.0", port=8000
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_uvicorn_run_called_when_run_as_main() do?
test_uvicorn_run_called_when_run_as_main() is a function in the fastapi codebase, defined in tests/test_tutorial/test_debugging/test_tutorial001.py.
Where is test_uvicorn_run_called_when_run_as_main() defined?
test_uvicorn_run_called_when_run_as_main() is defined in tests/test_tutorial/test_debugging/test_tutorial001.py at line 34.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free