def test_mount_gradio_app_args_match_launch_args():
    """Test that all arguments in Blocks.launch() are also valid in mount_gradio_app()."""
    # Get the parameters from both functions
    launch_params = inspect.signature(gr.Blocks.launch).parameters
    mount_params = inspect.signature(routes.mount_gradio_app).parameters

    # Parameters that are intentionally not included in mount_gradio_app
    exception_list = {
        "inline",
        "inbrowser",
        "prevent_thread_lock",
        "debug",
        "quiet",
        "height",
        "width",
        "ssl_keyfile",
        "ssl_certfile",
        "ssl_keyfile_password",
        "ssl_verify",
        "share",
        "share_server_address",
        "share_server_protocol",
        "share_server_tls_certificate",
        "state_session_capacity",
        "_frontend",
        "self",
        "strict_cors",
        "max_threads",
        "i18n",
    }

    missing_params = []
    for param_name in launch_params:
        if param_name not in exception_list and param_name not in mount_params:
            missing_params.append(param_name)

    assert not missing_params, (
        f"Parameters in launch() but missing in mount_gradio_app(): {missing_params}"
    )
Test that all arguments in Blocks.launch() are also valid in mount_gradio_app().
test/test_routes.py