Coverage for tests / test_tutorial / test_python_types / test_tutorial001_tutorial002.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-02-12 18:15 +0000
1import runpy 1abcd
2from unittest.mock import patch 1abcd
4import pytest 1abcd
7@pytest.mark.parametrize( 1abcd
8 "module_name",
9 [
10 "tutorial001_py310",
11 "tutorial002_py310",
12 ],
13)
14def test_run_module(module_name: str): 1abcd
15 with patch("builtins.print") as mock_print: 1efg
16 runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__") 1efg
18 mock_print.assert_called_with("John Doe") 1efg