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