Coverage for tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py310_tests_main.py: 100%
10 statements
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
« prev ^ index » next coverage.py v7.6.1, created at 2024-09-09 00:02 +0000
1import subprocess 1iabcde
2from pathlib import Path 1iabcde
4from ....conftest import needs_py310 1iabcde
7@needs_py310 1iabcde
8def test_run_tests(clear_sqlmodel): 1abcde
9 from docs_src.tutorial.fastapi.app_testing.tutorial001_py310 import test_main as mod 1fgh
11 test_path = Path(mod.__file__).resolve().parent 1fgh
12 top_level_path = Path(__file__).resolve().parent.parent.parent.parent.parent 1fgh
13 result = subprocess.run( 1fgh
14 [
15 "coverage",
16 "run",
17 "--parallel-mode",
18 "-m",
19 "pytest",
20 test_path,
21 ],
22 cwd=top_level_path,
23 capture_output=True,
24 )
25 assert result.returncode == 0, result.stdout.decode("utf-8") 1fgh