def test_verbose_param(tmp_path, capsys):
    """Test that output is present when verbose parameter is set."""
    model = BoringModel()
    model.example_input_array = torch.randn(5, 32)
    file_path = os.path.join(tmp_path, "model.onnx")

    with patch("torch.onnx.log", autospec=True) as mocked:
        model.to_onnx(file_path, verbose=True)
    (prefix, _), _ = mocked.call_args
    assert prefix == "Exported graph: "
Test that output is present when verbose parameter is set.
tests/tests_pytorch/models/test_onnx.py