MCPcopy
hub / github.com/fastapi/fastapi / test_router_circular_import

Function test_router_circular_import

tests/test_router_circular_import.py:5–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test_router_circular_import():
6 router = APIRouter()
7
8 with pytest.raises(
9 AssertionError,
10 match="Cannot include the same APIRouter instance into itself. Did you mean to include a different router?",
11 ):
12 router.include_router(router)

Callers

nothing calls this directly

Calls 2

include_routerMethod · 0.95
APIRouterClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…