Coverage for tests/conftest.py: 100%
17 statements
« prev ^ index » next coverage.py v7.17.2, created at 2026-12-05 11:33 +0000
« prev ^ index » next coverage.py v7.17.2, created at 2026-12-05 11:33 +0000
1import sys 1abcdefghijkl
2from collections.abc import Generator 1abcdefghijkl
4import pytest 1abcdefghijkl
5from typer import rich_utils 1abcdefghijkl
7from fastapi_cli.logging import setup_logging 1abcdefghijkl
10@pytest.fixture(autouse=True) 1abcdefghijkl
11def reset_syspath() -> Generator[None, None, None]: 1abcdefghijkl
12 initial_python_path = sys.path.copy() 1abcdefghijkl
13 try: 1abcdefghijkl
14 yield 1abcdefghijkl
15 finally:
16 sys.path = initial_python_path 1abcdefghijkl
19@pytest.fixture(autouse=True, scope="session") 1abcdefghijkl
20def setup_terminal() -> None: 1abcdefghijkl
21 rich_utils.MAX_WIDTH = 3000 1abcdefghijkl
22 rich_utils.FORCE_TERMINAL = False 1abcdefghijkl
23 setup_logging(terminal_width=3000) 1abcdefghijkl
24 return 1abcdefghijkl