- Sort Score
- Result 10 results
- Languages All
Results 1 - 3 of 3 for run_module (0.04 sec)
-
tests/test_tutorial/test_python_types/test_tutorial001_tutorial002.py
@pytest.mark.parametrize( "module_name", [ "tutorial001_py39", "tutorial002_py39", ], ) def test_run_module(module_name: str): with patch("builtins.print") as mock_print: runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 398 bytes - Viewed (0) -
tests/test_tutorial/test_python_types/test_tutorial011.py
pytest.param("tutorial011_py39"), pytest.param("tutorial011_py310", marks=needs_py310), ], ) def test_run_module(module_name: str): with patch("builtins.print") as mock_print: runpy.run_module(f"docs_src.python_types.{module_name}", run_name="__main__") assert mock_print.call_count == 2 call_args = [str(arg.args[0]) for arg in mock_print.call_args_list] assert call_args == [
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 691 bytes - Viewed (0) -
tests/test_tutorial/test_debugging/test_tutorial001.py
def test_uvicorn_run_called_when_run_as_main(): # Just for coverage if sys.modules.get(MOD_NAME): del sys.modules[MOD_NAME] with unittest.mock.patch("uvicorn.run") as uvicorn_run_mock: runpy.run_module(MOD_NAME, run_name="__main__") uvicorn_run_mock.assert_called_once_with( unittest.mock.ANY, host="0.0.0.0", port=8000 ) def test_openapi_schema(client: TestClient):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 10:43:02 UTC 2025 - 1.8K bytes - Viewed (0)