Coverage for tests/test_tutorial/test_soonify_return/test_tutorial003.py: 100%
9 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-11 11:00 +0000
« prev ^ index » next coverage.py v7.16.2, created at 2026-11-11 11:00 +0000
1from unittest.mock import patch 1nopqrstuvwxyz
3from ...conftest import get_testing_print_function 1nopqrstuvwxyz
6def test_tutorial(): 1nopqrstuvwxyz
7 calls = [] 1abcdefghijklm
9 new_print = get_testing_print_function(calls) 1abcdefghijklm
11 with patch("builtins.print", new=new_print): 1abcdefghijklm
12 from docs_src.tutorial.soonify_return import tutorial003 as mod 1abcdefghijklm
14 assert mod 1abcdefghijklm
15 assert calls == [ 1abcdefghijklm
16 ["Preview value1: Hello, Yury"],
17 ["Hello, Yury"],
18 ["Hello, Nathaniel"],
19 ["Hello, Alex"],
20 ]