Coverage for tests/test_tutorial/test_testing/test_app02.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.6.1, created at 2025-04-14 00:18 +0000

1import subprocess 1abcdefghi

2import sys 1abcdefghi

3 

4from docs_src.testing.app02 import main as mod 1abcdefghi

5from docs_src.testing.app02.test_main import test_app 1abcdefghi

6 

7 

8def test_app02(): 1abcdefghi

9 test_app() 1abcdefghi

10 

11 

12def test_script(): 1abcdefghi

13 result = subprocess.run( 1abcdefghi

14 [sys.executable, "-m", "coverage", "run", mod.__file__, "--help"], 

15 capture_output=True, 

16 encoding="utf-8", 

17 ) 

18 assert "Usage" in result.stdout 1abcdefghi