Coverage for tests / test_router_circular_import.py: 100%
6 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
1import pytest 1abcd
2from fastapi import APIRouter 1abcd
5def test_router_circular_import(): 1abcd
6 router = APIRouter() 1efg
8 with pytest.raises( 1efg
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) 1efg