Coverage for tests/test_tutorial/test_soonify/test_tutorial002.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.16.2, created at 2026-11-11 11:00 +0000

1from unittest.mock import patch 1nopqrstuvwxyz

2 

3from ...conftest import get_testing_print_function 1nopqrstuvwxyz

4 

5 

6def test_tutorial(): 1nopqrstuvwxyz

7 calls = [] 1abcdefghijklm

8 

9 new_print = get_testing_print_function(calls) 1abcdefghijklm

10 

11 with patch("builtins.print", new=new_print): 1abcdefghijklm

12 from docs_src.tutorial.soonify import tutorial002 as mod 1abcdefghijklm

13 

14 assert mod 1abcdefghijklm

15 assert calls == [["Hello, Yury"], ["Hello, Nathaniel"], ["Hello, Alex"]] 1abcdefghijklm