Coverage for tests/test_tutorial/test_fastapi/test_app_testing/test_tutorial001_py39_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 1jabcde
2from pathlib import Path 1jabcde
4from ....conftest import needs_py39 1jabcde
7@needs_py39 1jabcde
8def test_run_tests(clear_sqlmodel): 1abcde
9 from docs_src.tutorial.fastapi.app_testing.tutorial001_py39 import test_main as mod 1fghi
11 test_path = Path(mod.__file__).resolve().parent 1fghi
12 top_level_path = Path(__file__).resolve().parent.parent.parent.parent.parent 1fghi
13 result = subprocess.run( 1fghi
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") 1fghi