test_signatures_consistency() — fastapi Function Reference
Architecture documentation for the test_signatures_consistency() function in test_operations_signatures.py from the fastapi codebase.
Entity Profile
Dependency Diagram
graph TD 9d0912d4_6c1b_d63f_e0f9_98397e990802["test_signatures_consistency()"] 061b758f_afcc_18c0_6d74_c11f748a0d30["test_operations_signatures.py"] 9d0912d4_6c1b_d63f_e0f9_98397e990802 -->|defined in| 061b758f_afcc_18c0_6d74_c11f748a0d30 style 9d0912d4_6c1b_d63f_e0f9_98397e990802 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_operations_signatures.py lines 8–22
def test_signatures_consistency():
base_sig = inspect.signature(APIRouter.get)
for method_name in method_names:
router_method = getattr(APIRouter, method_name)
app_method = getattr(FastAPI, method_name)
router_sig = inspect.signature(router_method)
app_sig = inspect.signature(app_method)
param: inspect.Parameter
for key, param in base_sig.parameters.items():
router_param: inspect.Parameter = router_sig.parameters[key]
app_param: inspect.Parameter = app_sig.parameters[key]
assert param.annotation == router_param.annotation
assert param.annotation == app_param.annotation
assert param.default == router_param.default
assert param.default == app_param.default
Domain
Subdomains
Defined In
Source
Frequently Asked Questions
What does test_signatures_consistency() do?
test_signatures_consistency() is a function in the fastapi codebase, defined in tests/test_operations_signatures.py.
Where is test_signatures_consistency() defined?
test_signatures_consistency() is defined in tests/test_operations_signatures.py at line 8.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free